Part Number Hot Search : 
MICRO 66TQC SAA71 SMC170 TA200816 F15AR 68F30 2SA905
Product Description
Full Text Search
 

To Download HD6417606 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  revision date: se p . 13 , 2007 32 sh7606 group hardware manual renesas 32-bit risc microcomputer superh? risc engine family / sh7606 series sh7606 HD6417606 rev.4.00 rej09b0239-0400
rev. 4.00 sep. 13, 2007 page ii of xxvi
rev. 4.00 sep. 13, 2007 page iii of xxvi 1. this document is provided for reference purposes only so that renesas customers may select the appropriate renesas products for their use. renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of renesas or any third party with respect to the information in this document. 2. renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. you should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. when exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. all information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, is current as of the date this document is issued. such information, however, is subject to change without any prior notice. before purchasing or using any renesas products listed in this document, please confirm the latest product information with a renesas sales office. also, please pay regular and careful attention to additional and different information to be disclosed by renesas such as that disclosed through our website. (http://www.renesas.com ) 5. renesas has used reasonable care in compiling the information included in this document, but renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. when using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or renesas products. 7. with the exception of products specified by renesas as suitable for automobile applications, renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. if you are considering the use of our products for such purposes, please contact a renesas sales office beforehand. renesas shall have no liability for damages arising out of the uses set forth above. 8. notwithstanding the preceding paragraph, you should not use renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use renesas products in any of the foregoing applications shall indemnify and hold harmless renesas technology corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications. 9. you should use the products described herein within the range specified by renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. renesas shall have no liability for malfunctions or damages arising out of the use of renesas products beyond such specified ranges. 10. although renesas endeavors to improve the quality and reliability of its products, ic products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. in case renesas products listed in this document are detached from the products to which the renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. you should implement safety measures so that renesas products may not be easily detached from your products. renesas shall have no liability for damages arising out of such detachment. 12. this document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from renesas. 13. please contact a renesas sales office if you have any questions regarding the information contained in this document, renesas semiconductor products, or if you have any other inquiries. notes regarding these materials
rev. 4.00 sep. 13, 2007 page iv of xxvi general precautions on handling of product 1. treatment of nc pins note: do not connect anything to the nc pins. the nc (not connected) pins are either not connected to any of the internal circuitry or are they are used as test pins or to reduce noise. if something is connect ed to the nc pins, the operation of the lsi is not guaranteed. 2. treatment of unused input pins note: fix all unused input pins to high or low level. generally, the input pins of cmos products are high-impedance input pins. if unused pins are in their open states, intermediate levels are induced by noise in the vicinity, a pass- through current flows internally, and a malfunction may occur. 3. processing before initialization note: when power is first supplied, the product?s state is undefined. the states of internal circuits are undefined until full power is supplied throughout the chip and a low level is input on the reset pi n. during the period where the states are undefined, the register settings and the output state of each pin are also undefined. design your system so that it does not malfunction because of processing while it is in this undefined state. for those products which have a reset function, reset the lsi immediately after the power supply has been turned on. 4. prohibition of access to undefined or reserved addresses note: access to undefined or reserved addresses is prohibited. the undefined or reserved addresses may be used to expand functions, or test registers may have been be allocated to these addresses. do not access these registers; the system?s operation is not guaranteed if they are accessed.
rev. 4.00 sep. 13, 2007 page v of xxvi configuration of this manual this manual comprises the following items: 1. general precautions on handling of product 2. configuration of this manual 3. preface 4. contents 5. overview 6. description of functional modules ? cpu and system-control modules ? on-chip peripheral modules the configuration of the functional description of each module differs according to the module. however, the generic style includes the following items: i) feature ii) input/output pin iii) register description iv) operation v) usage note when designing an application system that includ es this lsi, take notes into account. each section includes notes in relation to the descriptions given, and usage notes are given, as required, as the final part of each section. 7. list of registers 8. electrical characteristics 9. appendix 10. main revisions and additions in this edition (only for revised versions) the list of revisions is a summary of points that have been revised or added to earlier versions. this does not include all of the revised contents . for details, see the actual locations in this manual. 11. index
rev. 4.00 sep. 13, 2007 page vi of xxvi preface the sh7606 group risc (reduced instruction set computer) microcomputers include a renesas technology-original risc cpu as its core, and the peripheral functions required to configure a system. target users: this manual was written for users who will be using the sh7606 in the design of application systems. target users are expected to understand the fundamentals of electrical circuits, logical ci rcuits, and microcomputers. objective: this manual was written to explain the hardware functions and electrical characteristics of the sh76 06 to the target users. refer to the sh-1/sh-2/sh-dsp software manual for a detailed description of the instruction set. notes on reading this manual: ? in order to understand the overall functions of the chip read the manual according to the contents. this manual can be roughly categorized into parts on the cpu, system control functions, periph eral functions and elect rical characteristics. ? in order to understand the details of the cpu's functions read the sh-1/sh-2/sh-d sp software manual. ? in order to understand the details of a register when its name is known the addresses, bits, and initial values of the re gisters are summarized in section 18, list of registers. examples: register name: the following notation is used fo r cases when the same or a similar function, e.g. 16-bit timer pulse unit or serial communication interface, is im plemented on more than one channel: xxx_n (xxx is the register name and n is the channel number) bit order: the msb is on the left and the lsb is on the right. number notation: binary is b'xxxx, hexadecimal is h'xxxx, decimal is xxxx. signal notation: an overbar is added to a low-active signal: xxxx related manuals: the latest versions of all related manuals are available from our web site. please ensure you have the latest versions of all documents you require. http://www.renesas.com
rev. 4.00 sep. 13, 2007 page vii of xxvi sh7606 group manuals: document title document no. sh7606 group hardware manual this manual sh-1/sh-2/sh-dsp software manual rej09b0171 user's manuals for development tools: document title document no. superh tm risc engine c/c++ compiler, assembler, optimizing linkage editor user's manual rej10b0152 superh risc engine high-performance embedded workshop 3 user's manual rej10b0025 superh risc engine high-performance em bedded workshop 3 tutorial rej10b0023 application note: document title document no. superh risc engine c/c++ compiler rej05b0463 all trademarks and registered trademarks ar e the property of th eir respective owners.
rev. 4.00 sep. 13, 2007 page viii of xxvi contents section 1 overview ............................................................................................... 1 1.1 features....................................................................................................................... ........... 1 1.2 block diagram.................................................................................................................. ..... 5 1.3 pin assign ments ................................................................................................................ .... 6 1.4 pin functions .................................................................................................................. ....... 7 section 2 cpu ..................................................................................................... 19 2.1 features....................................................................................................................... ......... 19 2.2 register conf igurat ion......................................................................................................... 19 2.2.1 general registers (rn)............................................................................................ 21 2.2.2 control registers .................................................................................................... 21 2.2.3 system regi sters..................................................................................................... 23 2.2.4 initial values of registers....................................................................................... 23 2.3 data formats................................................................................................................... ..... 24 2.3.1 register data format .............................................................................................. 24 2.3.2 memory data formats ............................................................................................ 24 2.3.3 immediate data formats......................................................................................... 25 2.4 features of instructions....................................................................................................... .25 2.4.1 risc type .............................................................................................................. 25 2.4.2 addressing modes .................................................................................................. 28 2.4.3 instruction formats ................................................................................................. 31 2.5 instruction set ................................................................................................................ ...... 35 2.5.1 instruction set by type........................................................................................... 35 2.6 processing states.............................................................................................................. .... 48 2.6.1 state tran sition....................................................................................................... 48 section 3 cache ................................................................................................... 51 3.1 features....................................................................................................................... ......... 51 3.1.1 cache stru cture....................................................................................................... 51 3.1.2 divided areas and cache ....................................................................................... 53 3.2 register de scriptions.......................................................................................................... .54 3.2.1 cache control regi ster 1 (ccr1) .......................................................................... 54 3.2.2 cache control regi ster 3 (ccr3) .......................................................................... 55 3.3 operation ...................................................................................................................... ....... 55 3.3.1 searching cache ..................................................................................................... 55 3.3.2 read access............................................................................................................ 56
rev. 4.00 sep. 13, 2007 page ix of xxvi 3.3.3 write a ccess ........................................................................................................... 57 3.3.4 write-back buffer .................................................................................................. 57 3.3.5 coherency of cache and external memory ............................................................ 58 3.4 memory-mappe d cache ...................................................................................................... 58 3.4.1 address array ......................................................................................................... 58 3.4.2 data array .............................................................................................................. 59 3.4.3 usage examples...................................................................................................... 61 section 4 u memory............................................................................................63 4.1 features....................................................................................................................... ......... 63 section 5 exception handling .............................................................................65 5.1 overview....................................................................................................................... ....... 65 5.1.1 types of exception ha ndling and pr iority.............................................................. 65 5.1.2 exception handlin g operations .............................................................................. 66 5.1.3 exception handling vector table........................................................................... 67 5.2 resets ......................................................................................................................... .......... 69 5.2.1 types of resets....................................................................................................... 69 5.2.2 power-on reset ...................................................................................................... 69 5.2.3 h-udi reset ........................................................................................................... 70 5.3 address errors ................................................................................................................. .... 71 5.3.1 address error sources ............................................................................................ 71 5.3.2 address error exce ption source............................................................................. 71 5.4 interrupts..................................................................................................................... ......... 72 5.4.1 interrupt sources..................................................................................................... 72 5.4.2 interrupt priority ..................................................................................................... 72 5.4.3 interrupt except ion handling ................................................................................. 73 5.5 exceptions triggered by instructions .................................................................................. 74 5.5.1 types of exceptions trig gered by instructions ...................................................... 74 5.5.2 trap instru ctions ..................................................................................................... 74 5.5.3 illegal slot in structions ........................................................................................... 75 5.5.4 general illegal instructions..................................................................................... 75 5.6 cases when exceptions are accepted ................................................................................. 76 5.7 stack states after exce ption handling ends ........................................................................ 77 5.8 usage notes .................................................................................................................... ..... 79 5.8.1 value of stack pointer (sp) .................................................................................... 79 5.8.2 value of vector base register (vbr) .................................................................... 79 5.8.3 address errors caused by stacking fo r address error exception handling .......... 79 5.8.4 notes on slot illegal inst ruction exceptio n handling ............................................ 79
rev. 4.00 sep. 13, 2007 page x of xxvi section 6 interrupt controller (intc)................................................................. 81 6.1 features....................................................................................................................... ......... 81 6.2 input/output pins.............................................................................................................. ... 83 6.3 register de scriptions.......................................................................................................... .83 6.3.1 interrupt control re gister 0 (icr0)........................................................................ 84 6.3.2 irq control register (irqcr) .............................................................................. 84 6.3.3 irq status regi ster (irqsr) ................................................................................. 88 6.3.4 interrupt priority registers a to e (ipra to ipre)................................................ 94 6.4 interrupt sources.............................................................................................................. .... 98 6.4.1 external interrupts .................................................................................................. 98 6.4.2 on-chip peripheral mo dule inte rrupts ................................................................... 99 6.4.3 user break interrupt ............................................................................................... 99 6.4.4 h-udi interrupt .................................................................................................... 100 6.5 interrupt exception hand ling vector table....................................................................... 100 6.6 interrupt op eration ............................................................................................................ 102 6.6.1 interrupt sequence ................................................................................................ 102 6.6.2 stack after interrupt ex ception hand ling ............................................................. 104 6.7 interrupt respon se time.................................................................................................... 104 section 7 bus state controller (bsc) ............................................................. 107 7.1 features....................................................................................................................... ....... 107 7.2 input/output pins.............................................................................................................. .110 7.3 area overview.................................................................................................................. .111 7.3.1 area division........................................................................................................ 111 7.3.2 shadow area......................................................................................................... 111 7.3.3 address ma p......................................................................................................... 112 7.3.4 area 0 memory type and memory bus width .................................................... 114 7.3.5 data alignm ent..................................................................................................... 114 7.4 register desc riptions......................................................................................................... 1 15 7.4.1 common control regi ster (cmn cr) .................................................................. 116 7.4.2 csn space bus control register (csn bcr) (n = 0, 3, 4, 5b, 6b)....................... 117 7.4.3 csn space wait control register (csn wcr) (n = 0, 3, 4, 5b, 6b) .................... 122 7.4.4 sdram control regi ster (sd cr)....................................................................... 138 7.4.5 refresh timer control/statu s register (r tcsr)................................................. 139 7.4.6 refresh timer coun ter (rtcnt)......................................................................... 141 7.4.7 refresh time constant register (rtcor) .......................................................... 142 7.5 operation ...................................................................................................................... ..... 143 7.5.1 endian/access size and da ta alignment.............................................................. 143 7.5.2 normal space interface ........................................................................................ 148 7.5.3 access wait control ............................................................................................. 152
rev. 4.00 sep. 13, 2007 page xi of xxvi 7.5.4 extension of chip select ( csn ) assertion period................................................. 153 7.5.5 sdram interface ................................................................................................. 155 7.5.6 byte-selection sram interface ........................................................................... 180 7.5.7 pcmcia inte rface................................................................................................ 184 7.5.8 wait between a ccess cycl es ................................................................................ 190 7.5.9 others.................................................................................................................... 190 section 8 clock pul se generator (cpg)............................................................193 8.1 features....................................................................................................................... ....... 193 8.2 input/output pins .............................................................................................................. .196 8.3 clock operatin g modes ..................................................................................................... 196 8.4 register desc riptions ......................................................................................................... 1 98 8.4.1 frequency control re gister (f rqcr) ................................................................. 198 8.5 changing frequency .......................................................................................................... 200 8.5.1 changing multiplica tion ratio ............................................................................. 200 8.5.2 changing divisi on ratio....................................................................................... 201 8.5.3 changing clock op erating mode ......................................................................... 202 8.6 notes on boar d design ...................................................................................................... 203 section 9 watchdog timer (wdt)....................................................................205 9.1 features....................................................................................................................... ....... 205 9.2 register desc riptions ......................................................................................................... 2 06 9.2.1 watchdog timer coun ter (wtcnt).................................................................... 206 9.2.2 watchdog timer control/statu s register (w tcsr)............................................ 207 9.2.3 notes on regist er access...................................................................................... 209 9.3 wdt opera tion ................................................................................................................. 2 10 9.3.1 canceling software standbys ............................................................................... 210 9.3.2 changing frequency ............................................................................................. 211 9.3.3 using watchdog ti mer mode .............................................................................. 211 9.3.4 using interval timer mode .................................................................................. 212 9.4 usage note..................................................................................................................... .... 212 section 10 power-down modes ........................................................................213 10.1 features....................................................................................................................... ....... 213 10.1.1 types of power-down modes .............................................................................. 213 10.2 input/output pins .............................................................................................................. .215 10.3 register desc riptions ......................................................................................................... 2 15 10.3.1 standby control regi ster (st bcr)...................................................................... 216 10.3.2 standby control regist er 2 (st bcr2)................................................................. 217 10.3.3 standby control regist er 3 (st bcr3)................................................................. 218
rev. 4.00 sep. 13, 2007 page xii of xxvi 10.3.4 standby control regist er 4 (st bcr4)................................................................. 219 10.4 sleep mode ..................................................................................................................... ... 220 10.4.1 transition to sl eep mode...................................................................................... 220 10.4.2 canceling slee p mode .......................................................................................... 220 10.5 software sta ndby mode ..................................................................................................... 220 10.5.1 transition to software standby mode .................................................................. 220 10.5.2 canceling software standby m ode ...................................................................... 222 10.6 module standby mode....................................................................................................... 223 10.6.1 transition to module standby mode .................................................................... 223 10.6.2 canceling module stan dby function.................................................................... 223 section 11 compare match timer (cmt) ........................................................ 225 11.1 features....................................................................................................................... ....... 225 11.2 register desc riptions......................................................................................................... 2 26 11.2.1 compare match timer start register (c mstr) .................................................. 226 11.2.2 compare match timer control/sta tus register (cmcsr) .................................. 227 11.2.3 compare match coun ter (cmcnt)..................................................................... 228 11.2.4 compare match constant register (c mcor) ..................................................... 228 11.3 operation ...................................................................................................................... ..... 229 11.3.1 interval count operation ...................................................................................... 229 11.3.2 cmcnt count timing......................................................................................... 229 11.4 interrupts..................................................................................................................... ....... 230 11.4.1 interrupt sources................................................................................................... 230 11.4.2 timing of setting co mpare match flag ............................................................... 230 11.4.3 timing of clearing co mpare match flag............................................................. 230 11.5 usage notes .................................................................................................................... ... 231 11.5.1 conflict between write and compare- match processes of cmcnt ................... 231 11.5.2 conflict between word-write and co unt-up processes of cmcnt ................... 231 11.5.3 conflict between byte-write and c ount-up processes of cmcnt..................... 232 11.5.4 conflict between write processes to cmcnt with the counting stopped and cmcor................................................................................................................ 233 section 12 serial communication interface with fifo (scif)........................ 235 12.1 overview....................................................................................................................... ..... 235 12.1.1 features................................................................................................................. 235 12.2 pin config uration.............................................................................................................. .238 12.3 register desc ription .......................................................................................................... 2 39 12.3.1 receive shift regi ster (scrs r) .......................................................................... 240 12.3.2 receive fifo data re gister (scf rdr) .............................................................. 240 12.3.3 transmit shift regi ster (sct sr) ......................................................................... 240
rev. 4.00 sep. 13, 2007 page xiii of xxvi 12.3.4 transmit fifo data re gister (scftdr) ............................................................. 241 12.3.5 serial mode regist er (scsmr)............................................................................ 241 12.3.6 serial control regi ster (scs cr).......................................................................... 245 12.3.7 serial status regi ster (scfsr) ............................................................................ 249 12.3.8 bit rate regist er (scbrr) .................................................................................. 257 12.3.9 fifo control regi ster (scf cr) .......................................................................... 263 12.3.10 fifo data count regi ster (scfdr) .................................................................... 267 12.3.11 serial port regist er (scsptr) ............................................................................. 268 12.3.12 line status regist er (sclsr) .............................................................................. 272 12.4 operation ...................................................................................................................... ..... 273 12.4.1 overview............................................................................................................... 273 12.4.2 operation in asynch ronous mode ........................................................................ 275 12.4.3 synchronous mode ............................................................................................... 286 12.5 scif inte rrupts ................................................................................................................ .. 294 12.6 serial port register (scs ptr) and scif pins .................................................................. 295 12.7 usage notes .................................................................................................................... ... 298 section 13 host interface (hif).........................................................................301 13.1 features....................................................................................................................... ....... 301 13.2 input/output pins .............................................................................................................. .303 13.3 parallel access ................................................................................................................ ... 304 13.3.1 operation .............................................................................................................. 304 13.3.2 connection me thod............................................................................................... 304 13.4 register desc riptions ......................................................................................................... 3 05 13.4.1 hif index register (hifidx) .............................................................................. 305 13.4.2 hif general status re gister (hif gsr)................................................................ 307 13.4.3 hif status/control re gister (hifscr) ................................................................ 307 13.4.4 hif memory control re gister (hif mcr) ........................................................... 310 13.4.5 hif internal interrupt cont rol register (hifiicr) .............................................. 312 13.4.6 hif external interrupt cont rol register (hifeicr) ............................................ 313 13.4.7 hif address regist er (hifadr) ......................................................................... 314 13.4.8 hif data register (hifdata) ............................................................................ 315 13.4.9 hif boot control re gister (h ifbcr).................................................................. 315 13.4.10 hifdreq trigger register (hifdtr) ................................................................ 316 13.4.11 hif bank interrupt contro l register (h ifbicr) ................................................. 317 13.5 memory map ..................................................................................................................... 319 13.6 interface (b asic).............................................................................................................. ... 320 13.7 interface (d etails) ............................................................................................................ .. 321 13.7.1 hifidx write/hif gsr read .............................................................................. 321 13.7.2 reading/writing of hif registers ot her than hifidx and hifgsr................... 321
rev. 4.00 sep. 13, 2007 page xiv of xxvi 13.7.3 consecutive data writing to hi fram by extern al device................................. 322 13.7.4 consecutive data reading from hi fram to external device ............................ 322 13.8 external dmac interface.................................................................................................. 323 13.9 interface when external devi ce power is cu t off ............................................................ 329 section 14 pin functio n controller (pfc) ........................................................ 333 14.1 register desc riptions......................................................................................................... 3 43 14.1.1 port a io register h (paiorh) .......................................................................... 343 14.1.2 port a control register h1 an d h2 (pacrh1 an d pacrh2) ............................ 344 14.1.3 port b io register l (pbiorl) ........................................................................... 347 14.1.4 port b control register l1 and l2 (pbcrl1 an d pbcrl2)............................... 347 14.1.5 port c io register h and l (pciorh and pciorl) .......................................... 352 14.1.6 port d io register l (pdiorl)........................................................................... 352 14.1.7 port d control regist er l2 (pdcrl2) ................................................................ 353 14.1.8 port e io register h and l (peiorh and peiorl) ........................................... 355 14.1.9 port e control register h1, h2, l1, and l2 (pecrh1, pecrh2, pecrl1, and pecrl 2)........................................................................................................ 355 section 15 i/o ports........................................................................................... 363 15.1 port a......................................................................................................................... ........ 363 15.1.1 register desc ription ............................................................................................. 363 15.1.2 port a data regist er h (padrh) ........................................................................ 363 15.2 port b ......................................................................................................................... ........ 365 15.2.1 register desc ription ............................................................................................. 365 15.2.2 port b data regist er l (pbdrl) ......................................................................... 365 15.3 port c ......................................................................................................................... ........ 367 15.3.1 register desc ription ............................................................................................. 368 15.3.2 port c data registers h an d l (pcdrh and pcdrl) ........................................ 368 15.4 port d......................................................................................................................... ........ 370 15.4.1 register desc ription ............................................................................................. 370 15.4.2 port d data regist er l (pddrl)......................................................................... 370 15.5 port e ......................................................................................................................... ........ 372 15.5.1 register desc ription ............................................................................................. 373 15.5.2 port e data registers h an d l (pedrh and pedrl) ......................................... 373 15.6 usage note..................................................................................................................... .... 375 section 16 user break controller (ubc).......................................................... 377 16.1 features....................................................................................................................... ....... 377 16.2 register desc riptions......................................................................................................... 3 79 16.2.1 break address regist er a (bara)...................................................................... 379
rev. 4.00 sep. 13, 2007 page xv of xxvi 16.2.2 break address mask regi ster a (bamra)......................................................... 380 16.2.3 break bus cycle regi ster a ( bbra)................................................................... 380 16.2.4 break address regist er b (ba rb) ...................................................................... 381 16.2.5 break address mask re gister b (b amrb) ......................................................... 382 16.2.6 break data regist er b (bdrb) ............................................................................ 382 16.2.7 break data mask regi ster b (b dmrb)............................................................... 383 16.2.8 break bus cycle regi ster b ( bbrb) ................................................................... 383 16.2.9 break control regi ster (brc r) ........................................................................... 385 16.2.10 execution times break register (betr)............................................................. 387 16.2.11 branch source regi ster (brs r)........................................................................... 388 16.2.12 branch destination re gister ( brdr)................................................................... 389 16.3 operation ...................................................................................................................... ..... 390 16.3.1 flow of user break operatio n .............................................................................. 390 16.3.2 break on instructio n fetch cy cle.......................................................................... 391 16.3.3 break on data a ccess cycle................................................................................. 391 16.3.4 sequential break ................................................................................................... 392 16.3.5 value of saved progra m counter (pc)................................................................. 392 16.3.6 pc trace ............................................................................................................... 393 16.3.7 usage examples.................................................................................................... 394 16.3.8 usage notes .......................................................................................................... 397 section 17 user debuggi ng interface (h-udi) .................................................399 17.1 features....................................................................................................................... ....... 399 17.2 input/output pins .............................................................................................................. .401 17.3 register desc riptions ......................................................................................................... 4 02 17.3.1 bypass register (sdbpr) .................................................................................... 402 17.3.2 instruction regist er (sdir) .................................................................................. 402 17.3.3 boundary scan regist er (sdbsr) ....................................................................... 403 17.3.4 id register (sdid)............................................................................................... 409 17.4 operation ...................................................................................................................... ..... 410 17.4.1 tap contro ller ..................................................................................................... 410 17.4.2 reset configur ation .............................................................................................. 411 17.4.3 tdo output timing ............................................................................................. 411 17.4.4 h-udi reset ......................................................................................................... 412 17.4.5 h-udi interrupt .................................................................................................... 412 17.5 boundary scan .................................................................................................................. .413 17.5.1 supported inst ructions .......................................................................................... 413 17.5.2 points for a ttention............................................................................................... 414 17.6 usage notes .................................................................................................................... ... 414
rev. 4.00 sep. 13, 2007 page xvi of xxvi section 18 list of registers............................................................................... 415 18.1 register addresses (a ddress order).................................................................................. 415 18.2 register bits.................................................................................................................. ..... 421 18.3 register states in each processing state ........................................................................... 433 section 19 electrical characteristics ................................................................. 439 19.1 absolute maximum ratings .............................................................................................. 439 19.2 power-on and powe r-off order ........................................................................................ 439 19.3 dc charact eristics ............................................................................................................. 442 19.4 ac charact eristics ............................................................................................................. 444 19.4.1 clock timing ........................................................................................................ 445 19.4.2 control signal timing .......................................................................................... 448 19.4.3 bus timing ........................................................................................................... 450 19.4.4 basic timi ng......................................................................................................... 452 19.4.5 synchronous dram timing ................................................................................ 458 19.4.6 pcmcia timing .................................................................................................. 475 19.4.7 scif timi ng ......................................................................................................... 479 19.4.8 port timi ng........................................................................................................... 480 19.4.9 hif timi ng ........................................................................................................... 481 19.4.10 related pin timing ............................................................................................... 483 19.4.11 ac characteristic te st conditions ....................................................................... 485 19.4.12 delay time variation due to load ca pacitance (reference values) .................. 486 appendix ......................................................................................................... 487 a. port states in e ach pin state.............................................................................................. 487 b. product code lineup ......................................................................................................... 490 c. package dime nsions .......................................................................................................... 491 main revisions and additions in this edition..................................................... 493 index ......................................................................................................... 497
rev. 4.00 sep. 13, 2007 page xvii of xxvi figures section 1 overview figure 1.1 block di agram ..................................................................................................... ......... 5 figure 1.2 pin assignments ................................................................................................... ......... 6 section 2 cpu figure 2.1 cpu internal register conf iguration .......................................................................... 20 figure 2.2 regi ster data format.............................................................................................. ..... 24 figure 2.3 memo ry data format ................................................................................................ .. 24 figure 2.4 cpu state tran sition.............................................................................................. ..... 48 section 3 cache figure 3.1 cache structure ................................................................................................... ........ 51 figure 3.2 cache search scheme ............................................................................................... .. 56 figure 3.3 write-back buffer config uration................................................................................ 58 figure 3.4 specifying address and data for memo ry-mapped cache access............................. 60 section 6 interrupt controller (intc) figure 6.1 intc block diagram ................................................................................................ .. 82 figure 6.2 block diagram of ir q7 to irq0 inte rrupts control................................................... 99 figure 6.3 interrupt sequence flowchart.................................................................................... 10 3 figure 6.4 stack after in terrupt exception handling .................................................................. 104 section 7 bus state controller (bsc) figure 7.1 bloc k diagram of bsc.............................................................................................. 109 figure 7.2 address space ..................................................................................................... ...... 112 figure 7.3 normal space basic access timing (no- wait access)............................................ 148 figure 7.4 consecutive access to no rmal space (1): bus width = 16 bits, longword access, csnwcr.wm = 0 (a ccess wait = 0, cycl e wait = 0).............. 149 figure 7.5 consecutive access to no rmal space (2): bus width = 16 bits, longword access, csnwcr.wm = 1 (a ccess wait = 0, cycl e wait = 0).............. 150 figure 7.6 example of 16-bit data-width sram connection .................................................. 151 figure 7.7 example of 8-bit data-width sram connectio n.................................................... 151 figure 7.8 wait timing for normal space access (softwar e wait only ) ................................. 152 figure 7.9 wait cycle timi ng for normal space access (wait cycle insertion using wait ) ......................................................................... 153 figure 7.10 example of timing when csn assertion period is extended ................................ 154 figure 7.11 example of 16-bit data-width sdram connection ............................................. 156 figure 7.12 burst read ba sic timing (auto precharge) ............................................................ 164 figure 7.13 burst read wait speci fication timing (auto precharge) ....................................... 165
rev. 4.00 sep. 13, 2007 page xviii of xxvi figure 7.14 basic timing for single read (auto precharge)..................................................... 166 figure 7.15 basic timing for burst write (auto precharge) ..................................................... 167 figure 7.16 basic timing for single write (auto- precharge).................................................... 168 figure 7.17 burst read ti ming (no auto precharge) ................................................................ 170 figure 7.18 burst read timing (bank active, same row address) ......................................... 171 figure 7.19 burst read timing (ban k active, different row addresses) ................................ 172 figure 7.20 single write ti ming (no auto precharge).............................................................. 173 figure 7.21 single write timing (b ank active, same row address)....................................... 174 figure 7.22 single write timing (ban k active, different row addresses).............................. 175 figure 7.23 auto -refreshing timing ......................................................................................... 17 6 figure 7.24 self-refreshing timing........................................................................................... 178 figure 7.25 write timing for sdram mode register (based on jedec)............................... 180 figure 7.26 basic access timing fo r byte-selection sram (bas = 0)................................... 181 figure 7.27 basic access timing fo r byte-selection sram (bas = 1)................................... 182 figure 7.28 wait timing for byte-selection sram (bas = 1) (software wait only)............. 183 figure 7.29 example of connection with 16-bit data-width byte-selection sram ............... 184 figure 7.30 example of pc mcia interface connectio n............................................................ 185 figure 7.31 basic access timing fo r pcmcia memory ca rd interface................................... 186 figure 7.32 wait timing for pcmcia memo ry card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, software wait = 1, hardware wait = 1)................................. 186 figure 7.33 example of pcmcia space assignment (cs5bwcr.sa[1:0] = b'10, cs6bwcr.sa[1:0] = b'10) ................................................................................... 187 figure 7.34 basic timing for pcmcia i/o card interface ....................................................... 188 figure 7.35 wait timing for pcmcia i/o card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, software wait = 1, hardware wait = 1)................................. 189 figure 7.36 timing for dynamic bus sizing of pcmcia i/o card interface (ted[3:0] = b'0010, teh[3:0] = b' 0001, software waits = 3) ............................. 189 section 8 clock pulse generator (cpg) figure 8.1 block diagram of cpg ............................................................................................. 1 94 figure 8.2 points for attention when using crysta l resonator................................................. 203 section 9 watchdog timer (wdt) figure 9.1 block diagram of wdt ............................................................................................ 20 6 figure 9.2 writing to wtcnt and wtcsr.............................................................................. 210 section 10 power-down modes figure 10.1 canceling standby mode with stby bit in st bcr.............................................. 222 section 11 compare match timer (cmt) figure 11.1 block diagram of compare match timer............................................................... 225 figure 11.2 co unter operation ................................................................................................ ... 229
rev. 4.00 sep. 13, 2007 page xix of xxvi figure 11.3 count timing ..................................................................................................... ..... 229 figure 11.4 timi ng of cmf setting ........................................................................................... 2 30 figure 11.5 conflict between write an d compare-match proce sses of cmcnt ...................... 231 figure 11.6 conflict between word-write and count-up proce sses of cmcnt...................... 232 figure 11.7 conflict between byte-write and count-up proces ses of cmcnt ....................... 233 section 12 serial communicati on interface with fifo (scif) figure 12.1 bloc k diagram of scif........................................................................................... 2 37 figure 12.2 example of data format in asynchronous communication (8-bit data with parity and two stop bits) ............................................................ 275 figure 12.3 sample flowch art for scif in itializatio n ............................................................... 278 figure 12.4 sample flowchart for transmitting serial data...................................................... 279 figure 12.5 example of transmit opera tion (8-bit data, parity , one stop bit)........................ 281 figure 12.6 example of operation using modem control ( cts ).............................................. 281 figure 12.7 sample flowchar t for receiving se rial data .......................................................... 282 figure 12.8 sample flowchart fo r receiving serial data (cont)................................................ 283 figure 12.9 example of scif receive oper ation (8-bit data, parity , one stop bit)................ 285 figure 12.10 example of operation using modem control ( rts )............................................ 285 figure 12.11 data format in synchronous co mmunication ...................................................... 286 figure 12.12 sample flowch art for scif in itializati on.............................................................. 288 figure 12.13 sample flowchart for transmitting se rial data.................................................... 289 figure 12.14 example of sc if transmit operation................................................................... 290 figure 12.15 sample flowchart for receiving serial data (1)................................................... 291 figure 12.16 sample flowchart for receiving serial data (2)................................................... 291 figure 12.17 example of scif receive op eration .................................................................... 292 figure 12.18 sample flowchart for transmitting/receiving serial da ta................................... 293 figure 12.19 rtsio bit, rtsdt bit, and rts pin................................................................... 295 figure 12.20 ctsio bit, ctsdt bit, and cts pin................................................................... 296 figure 12.21 sckio bit, sckdt bit, and sck pin ................................................................. 297 figure 12.22 spbio bit, spbdt bit, and txd pin ................................................................... 297 figure 12.23 spbdt bit and rxd pin ....................................................................................... 298 figure 12.24 receive data sampli ng timing in asynchronous mode ...................................... 299 section 13 host interface (hif) figure 13.1 bloc k diagram of hif............................................................................................. 302 figure 13.2 hif co nnection exam ple ........................................................................................ 304 figure 13.3 basic ti ming for hif interface ............................................................................... 320 figure 13.4 hifidx wr ite and hifgsr read .......................................................................... 321 figure 13.5 hif register settings ............................................................................................ .. 321 figure 13.6 consecutive data writing to hifram................................................................... 322 figure 13.7 consecutive da ta reading from hifram ............................................................. 322
rev. 4.00 sep. 13, 2007 page xx of xxvi figure 13.8 hifdreq timing (when dmd = 0 and dpol = 0)............................................. 323 figure 13.9 hifdreq timing (when dmd = 0 and dpol = 1)............................................. 324 figure 13.10 hifdreq timing (w hen dmd = 1 and dpol = 0) ........................................... 324 figure 13.11 hifdreq timing (w hen dmd = 1 and dpol = 1) ........................................... 324 figure 13.12 image of high-impedance co ntrol of hif pins by hifebl pin .......................... 329 section 15 i/o ports figure 15.1 port a ........................................................................................................... ........... 363 figure 15.2 port b ........................................................................................................... ........... 365 figure 15.3 port c ........................................................................................................... ........... 367 figure 15.4 port d ........................................................................................................... ........... 370 figure 15.5 port e........................................................................................................... ............ 372 section 16 user break controller (ubc) figure 16.1 bloc k diagram of ubc........................................................................................... 37 8 section 17 user debugging interface (h-udi) figure 17.1 block diagram of h-udi........................................................................................ 400 figure 17.2 tap contro ller state tran sitions ............................................................................ 410 figure 17.3 h-udi da ta transfer timing.................................................................................. 412 figure 17.4 h-udi reset...................................................................................................... ...... 412 section 19 electrical characteristics figure 19.1 external clock input timing................................................................................... 446 figure 19.2 ckio cl ock output timings .................................................................................. 446 figure 19.3 oscillation settli ng timing after power-on............................................................ 446 figure 19.4 oscillation settling timi ng after standby mode (by rese t)................................... 447 figure 19.5 oscillation settling timing after standby mode (b y nmi or irq)........................ 447 figure 19.6 pll synchronize se ttling timing by re set or nm i ............................................... 447 figure 19.7 re set input timing............................................................................................... ... 448 figure 19.8 interrupt input timing........................................................................................... .. 449 figure 19.9 pin drive ti ming in sta ndby mode ........................................................................ 449 figure 19.10 basic bus timing: no wa it cycle ........................................................................ 452 figure 19.11 basic bus timing: one software wait cycl e ....................................................... 453 figure 19.12 basic bus timing: one external wait cycl e........................................................ 454 figure 19.13 basic bus timing: one software wait cycle, external wait enabled (wm bit = 0), no idle cycl e ................................................................................ 455 figure 19.14 byte control sram timing: sw = 1 cycle, hw = 1 cycle, one asynchronous external wait cycle, csnwcr.bas = 0 (ub-/lb-controlled write cycl e) ........................................................................ 456
rev. 4.00 sep. 13, 2007 page xxi of xxvi figure 19.15 byte control sram timing: sw = 1 cycle, hw = 1 cycle, one asynchronous external wait cycle, csnwcr.bas = 1 (we-controlled wr ite cycl e) ............................................................................... 457 figure 19.16 synchronous dram single read bus cycle (auto-precharge, cas latency = 2, wtrcd = 0 cycle, wtrp = 0 cycle)...... 458 figure 19.17 synchronous dram single read bus cycle (auto-precharge, cas latency = 2, wtrcd = 1 cycle, wtrp = 1 cycle)...... 459 figure 19.18 synchronous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 0 cycle, wtrp = 1 cycle)....... 460 figure 19.19 synchronous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 1 cycle, wtrp = 0 cycle)....... 461 figure 19.20 synchronous dram single write bus cycle (auto-precharge, trwl = 1 cycl e) ..................................................................... 462 figure 19.21 synchronous dram single write bus cycle (auto-precharge, wtrcd = 2 cy cles, trwl = 1 cycle) .................................. 463 figure 19.22 synchronous dram burst write bus cycle (single write 4) (auto-precharge, wtrcd = 0 cy cle, trwl = 1 cycle) .................................... 464 figure 19.23 synchronous dram burst write bus cycle (single write 4) (auto-precharge, wtrcd = 1 cy cle, trwl = 1 cycle) .................................... 465 figure 19.24 synchronous dram burst read bus cycle (single read 4) (bank active mode: act + read commands, cas la tency = 2, wtrcd = 0 cycle) ......... 466 figure 19.25 synchronous dram burst read bus cycle (single read 4) (bank active mode: read command, same row address, cas latency = 2, wt rcd = 0 cy cle)................................................................ 467 figure 19.26 synchronous dram burst read bus cycle (single read 4) (bank active mode: pre + act + read commands, different row addresses, cas la tency = 2, wtrcd = 0 cycle) ..................... 468 figure 19.27 synchronous dram burst write bus cycle (single write 4) (bank active mode: act + write commands, wtrcd = 0 cycle, tr wl = 0 cycle)................................................................. 469 figure 19.28 synchronous dram burst write bus cycle (single write 4) (bank active mode: write command, same row address, wtrcd = 0 cycle, tr wl = 0 cycle)................................................................. 470 figure 19.29 synchronous dram burst write bus cycle (single write 4) (bank active mode: pre + act + write commands, different row addresses, wtrcd = 0 cycle, trwl = 0 cycle) ..................... 471 figure 19.30 synchronous dram auto-refreshing timing (wtrp = 1 cycle, wt rc = 3 cycl es)................................................................. 472 figure 19.31 synchronous dram self-r efreshing timing (w trp = 1 cy cle) ....................... 473 figure 19.32 synchronous dram mode re gister write timing (wtrp = 1 cycle)............... 474
rev. 4.00 sep. 13, 2007 page xxii of xxvi figure 19.33 pcmcia memory card interface bus timing ..................................................... 475 figure 19.34 pcmcia memory card in terface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one software wait cy cle, one external wait cycle) ........... 476 figure 19.35 pcmcia i/o ca rd interface bus timing.............................................................. 477 figure 19.36 pcmcia i/o card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one software wait cy cle, one external wait cycle) ........... 478 figure 19.37 sck i nput clock ti ming ...................................................................................... 479 figure 19.38 sci input/output timi ng in clocked sync hronous mode .................................... 480 figure 19.39 i/o port timing ................................................................................................. .... 480 figure 19.40 hif access timing ............................................................................................... 482 figure 19.41 hifint and hifdreq timing ............................................................................ 482 figure 19.42 hifrdy and hif pin enable/disable timing...................................................... 483 figure 19.43 tck input timing................................................................................................ .484 figure 19.44 tck input timi ng in reset hold state................................................................. 484 figure 19.45 h-udi data transmission timing........................................................................ 484 figure 19.46 output load circuit ............................................................................................. .485 figure 19.47 load capac itance versus de lay time ................................................................... 486 appendix figure c.1 package di mensions (bp-176) ................................................................................. 491
rev. 4.00 sep. 13, 2007 page xxiii of xxvi tables section 1 overview table 1.1 pin functions ............................................................................................................ 7 table 1.2 pin features ............................................................................................................ 12 section 2 cpu table 2.1 initial values of registers....................................................................................... 23 table 2.2 word data sign extension...................................................................................... 25 table 2.3 delayed branch instructions................................................................................... 26 table 2.4 t bit ........................................................................................................................ 26 table 2.5 access to imme diate data ...................................................................................... 27 table 2.6 access to absolu te address.................................................................................... 27 table 2.7 access with di splacement ...................................................................................... 28 table 2.8 addressing modes and ef fective addresses........................................................... 28 table 2.9 instruction formats ................................................................................................. 32 table 2.10 instruction types .................................................................................................... 35 section 3 cache table 3.1 lru and way to be replaced ................................................................................ 52 table 3.2 correspondence between divided areas and cache............................................... 53 section 5 exception handling table 5.1 types of exceptions and priority............................................................................ 65 table 5.2 timing for exception detection and start of exception handling ......................... 66 table 5.3 vector numbers and vector table address offsets............................................... 67 table 5.4 calculating exception handling vector table addresses ...................................... 68 table 5.5 reset st atus............................................................................................................. 69 table 5.6 bus cycles and ad dress errors............................................................................... 71 table 5.7 interrupt sources..................................................................................................... 72 table 5.8 interrupt priority ..................................................................................................... 73 table 5.9 types of exceptions trig gered by instructions ...................................................... 74 table 5.10 delay slot instructions, interrupt disa bled instructions, and exceptions............... 76 table 5.11 stack status after exce ption handling ends........................................................... 77 section 6 interrupt controller (intc) table 6.1 pin configuration.................................................................................................... 83 table 6.2 interrupt exception handling vectors and pr iorities............................................ 101 table 6.3 interrupt response time....................................................................................... 105 section 7 bus state controller (bsc) table 7.1 pin configuration.................................................................................................. 110
rev. 4.00 sep. 13, 2007 page xxiv of xxvi table 7.2 address map 1 (cmn cr.map = 0) .................................................................... 112 table 7.3 address map 2 (cmn cr.map = 1) .................................................................... 113 table 7.4 correspondence between external pin (md3), memory type, and bus width for cs0......................................................................................... 114 table 7.5 correspondence between external pin (md5) and endians................................. 114 table 7.6 16-bit external device/big endian access and data alignment......................... 144 table 7.7 8-bit external device/big endian access and data alignment........................... 145 table 7.8 16-bit external device/little endian access and data alignment ...................... 146 table 7.9 8-bit external device/little endian access and data alignment ........................ 147 table 7.10 relationship between register settings and address multiplex output (1)......... 157 table 7.11 relationship between register settings and address multiplex output (2)......... 158 table 7.12 relationship between register settings and address multiplex output (3)......... 159 table 7.13 relationship between register settings and address multiplex output (4)......... 160 table 7.14 relationship between register settings and address multiplex output (5)......... 161 table 7.15 relationship between register settings and address multiplex output (6)......... 162 table 7.16 relationship between access size and number of bursts.................................... 163 table 7.17 access address for sdram m ode register write.............................................. 179 section 8 clock pulse generator (cpg) table 8.1 pin configuration.................................................................................................. 196 table 8.2 mode control pins and cl ock operating modes .................................................. 196 table 8.3 possible combination of clock modes and frqcr values................................ 197 section 10 power-down modes table 10.1 states of power- down modes .............................................................................. 214 table 10.2 pin configuration.................................................................................................. 215 table 10.3 register states in soft ware standby mode........................................................... 221 section 12 serial communicati on interface with fifo (scif) table 12.1 scif pins.............................................................................................................. 238 table 12.2 scsmr settin gs ................................................................................................... 258 table 12.3 bit rates and scbrr settings in asynchronous mode....................................... 258 table 12.4 bit rates and scbrr settings in synchronous mode ......................................... 261 table 12.5 maximum bit rates for various frequencies with baud rate generator (asynchronous mode) .......................................................................................... 262 table 12.6 maximum bit rates with external cl ock input (asynchronous mode)............... 263 table 12.7 maximum bit rates with external cl ock input (synchr onous mode) ................. 263 table 12.8 scsmr settings and scif co mmunication fo rmats .......................................... 274 table 12.9 scsmr and scscr settings and scif clock source selection......................... 274 table 12.10 serial communication formats (asynchronous mode).................................... 276 table 12.11 scif interrup t sources ..................................................................................... 294
rev. 4.00 sep. 13, 2007 page xxv of xxvi section 13 host interface (hif) table 13.1 pin configuration.................................................................................................. 303 table 13.2 hif opera tions ..................................................................................................... 304 table 13.3 memory map ........................................................................................................ 319 table 13.4 consecutive write procedure to hifram by external dmac........................... 326 table 13.5 consecutive read procedure from hifram by external dmac....................... 327 table 13.6 input/output control for hif pins........................................................................ 330 section 14 pin function controller (pfc) table 14.1 list of multiplexed pins (port a) ......................................................................... 333 table 14.2 list of multiplexed pins (por t b).......................................................................... 334 table 14.3 list of multiplexed pins (por t c).......................................................................... 336 table 14.4 list of multiplexed pins (port d) ......................................................................... 336 table 14.5 list of multiplexed pins (por t e).......................................................................... 337 table 14.6 pin functions in each operating mode ................................................................ 338 section 15 i/o ports table 15.1 port a data register h (padrh ) read/write op eration .................................... 364 table 15.2 port b data register l (pbdrl ) read/write operation ..................................... 366 table 15.3 port c data registers h and l (pcdrh and pcdrl) read/write operation .... 369 table 15.4 port d data register l (pddrl) read/write operation..................................... 371 table 15.5 port e data registers h, l (pedrh, pedrl) read/write operation ................ 374 section 16 user break controller (ubc) table 16.1 data access cycle addresses and oper and size comparison conditions ........... 391 section 17 user debugging interface (h-udi) table 17.1 pin configuration.................................................................................................. 401 table 17.2 h-udi commands................................................................................................ 403 table 17.3 external pins and boundary scan regist er bits ................................................... 404 table 17.4 reset configur ation .............................................................................................. 411 section 19 electrical characteristics table 19.1 absolute maximum ratings ................................................................................. 439 table 19.2 recommended timing at power-on..................................................................... 440 table 19.3 recommended timing in power-off.................................................................... 441 table 19.4 dc characteris tics (1)........................................................................................... 442 table 19.4 dc characteris tics (2)........................................................................................... 443 table 19.5 permissible output currents ................................................................................. 444 table 19.6 maximum operating frequency ........................................................................... 444 table 19.7 clock timing ........................................................................................................ 445 table 19.8 control signal timing .......................................................................................... 448 table 19.9 bus timing ........................................................................................................... 450
rev. 4.00 sep. 13, 2007 page xxvi of xxvi table 19.10 scif timing ..................................................................................................... 479 table 19.11 port timing....................................................................................................... 480 table 19.12 hif timing ....................................................................................................... 481 table 19.13 h-udi-related pin timing .............................................................................. 483 appendix table a.1 port states in e ach pin state................................................................................. 487
section 1 overview rev. 4.00 sep. 13, 2007 page 1 of 502 rej09b0239-0400 section 1 overview this lsi is a cmos single-chip microcontroller th at integrates a high-speed cpu core using an original renesas technology risc (reduced instruction set computer) architecture with supporting a variety of peripheral functions. the cpu of this lsi has a risc (reduced instru ction set computer) type instruction set. the cpu basically operates at a rate of one instruc tion per cycle, offering a great improvement in instruction execution speed. in addition, the 32-bit internal architecture provides improved data processing power. with this cpu, it has become possible to assemble low-cost, high- performance/high-functionality systems even for ap plications such as realtime control, which could not previously be handled by microcontr ollers because of thei r high-speed processing requirements. this lsi supports peripheral func tions necessary for system config uration, such as cache memory, ram, timers, a serial communication interface with on-chip fifo (scif), host interface (hfi), interrupt controller (intc), and i/o ports. the external memory access support function of this lsi enables direct connection to various types of memory, such as standard memory, sd ram, and pcmcia. this greatly reduces system cost. 1.1 features the features of this lsi are shown below. cpu: ? central processing unit with an internal 32-b it risc (reduced inst ruction set computer) architecture ? instruction length: 16-bit fixed length for improved code efficiency ? load-store architecture (basic operat ions are executed between registers) ? sixteen 32-bit general registers ? five-stage pipeline ? on-chip multiplier: multiplication operations (32 bits 32 bits 64 bits) executed in two to five cycles ? c language-oriented 62 basic instructions note: some specifications on the slot illegal in struction differ from th e conventional sh2 core. for details, see section 5.8, usage notes, in section 5, exception handling.
section 1 overview rev. 4.00 sep. 13, 2007 page 2 of 502 rej09b0239-0400 user break controller (ubc): ? address, data value, access type, and data si ze are available for setting as break conditions ? supports the sequential break function ? two break channels u memory: ? 4 kbytes cache memory: ? unified cache, mixture of instructions and data ? 4-way set associative type ? selection of write-back or write-through mode ? 16 kbytes bus state controller (bsc): ? address space is divided into five areas: thre e areas 0, 3, and 4; each a maximum of 64 mbytes, and two areas 5b and 6b; each a maxi mum of 32 mbytes (a ddress map 1 mode). ? address space is divided into five areas, 0, 3, 4, 5, and 6; each a maximum of 64 mbytes (address map 2 mode). ? 16-bit external bus ? the following features ar e settable for each area. ? bus size (8 or 16 bits) ? number of access wait cycles ? setting of idle wait cycles ? specifying the memory to be connected to e ach area enables direct connection to sram, sdram, and pcmcia. ? outputs chip select signals (cs0, cs3, cs4, cs5b, and cs6b) for corresponding area ? sdram refresh function ? supports auto-refresh and self-refresh modes ? sdram burst access function ? pcmcia access function ? conforms to the jeida ver. 4.2 standard, two slots ? selection of big or little endian mode (the mode of all the areas is switched collectively by a mode pin.)
section 1 overview rev. 4.00 sep. 13, 2007 page 3 of 502 rej09b0239-0400 interrupt controller (intc): ? supports nine external interrupt pins (nmi, irq7 to irq0) ? on-chip peripheral interrupt: priority level is independently selected for each module ? vector address: specified vector address for each interrupt source user debugging in terface (h-udi): ? supports the jtag interface emulator ? jtag standard pins arranged clock pulse generator (cpg): ? clock mode: clock source selectable between an external supply and crystal resonator ? three types of clocks generated: ? cpu clock: 100 mhz (max.) ? bus clock: 50 mhz (max.) ? peripheral clock: 50 mhz (max.) ? supports power-down modes: ? sleep mode ? software standby mode ? selection of four types of clock modes (pll2 2/ 4 and clock/crystal resonator are selectable) host interface (hif): ? 1 kbyte 2 banks: in total 2-kbyte buffer ram ? the buffer ram and the extern al device are connected in parallel via 16 data pins ? the buffer ram and the cpu of this lsi ar e connected in parallel via internal bus ? the external device can access the desired register after the register index has been specified. (however, when the buffer ram is accesse d successively, the address is updated automatically.) ? selection of endian mode ? interrupt requested to the external device ? internal interrupt requeste d to the cpu of this lsi ? booting from the buffer ram is enabled if the external device has stored the instruction code in the buffer ram
section 1 overview rev. 4.00 sep. 13, 2007 page 4 of 502 rej09b0239-0400 compare match timer (cmt): ? 16-bit counter ? generates compare match interrupts ? two channels serial communication int erface with fifo (scif): ? synchronous and asynchronous modes ? 16 bytes each for transmit/receive fifo ? high-speed uart ? the uart supports fifo stop and fifo trigger ? flow control enabled (channel 0 and channel 1 only) ? three channels i/o ports: ? 78 general input/output pins ? input or output can be set per bit within the input/output common port package: ? bp1313-176 (0.8 pitch) power supply voltage: ? i/o: 3.0 to 3.6 v internal: 1.5 0.1 v (two power sources ar e externally provided.)
section 1 overview rev. 4.00 sep. 13, 2007 page 5 of 502 rej09b0239-0400 1.2 block diagram figure 1.1 is a block diagram of this lsi. superh cpu core user break controller (ubc) cache access controller (ccn) u memory 4 kbytes cache memory 16 kbytes bus state controller (bsc) peripheral bus controller cpu bus (i clock) internal bus (b clock) external bus notes: host interface (hif) user debugging interface (h-udi) interrupt controller (intc) power- down mode control watchdog timer (wdt) clock pulse generator (cpg) serial communication interface with fifo (scif) * 1 peripheral bus (p clock) i/o port, pin function controller (pfc) compare match timer (cmt) * 2 1-kbyte sram 1. scif includes three channels. 2. cmt includes two channels. figure 1.1 block diagram
section 1 overview rev. 4.00 sep. 13, 2007 page 6 of 502 rej09b0239-0400 1.3 pin assignments bp1313-176 (top view) 1 a b c d e f g h j k l m n p r 2 3 4 5 6 7 8 9 10 11 12 13 14 15 vccq vssq pd3 pd0 vss pe22 pe18 pe16 pe12 vccq pe06 vcc pe02 pc17 vccq pa25 pd7 pd5 pd2 vcc pe21 pe17 pe15 pe11 vssq pe05 vss pe00 pc16 vssq pa22 pa24 pd6 pd4 pe08 pe23 pe19 vss pe13 pe09 pe07 pe03 pc09 pc15 pc00 vcc vss pa21 pa23 pa 1 8 pa 1 9 pa17 pa 2 0 pb08 pa16 pb07 pb10 vccq vssq pb09 pb01 pb05 pb06 pb00 cs0 rd pb11 pb13 a15 a13 a14 a12 a11 vss vcc a10 a08 pd1 pe24 pe20 vcc pe14 pe10 pe04 pe01 pc08 pc01 pc03 pc02 pc10 vcc vss pc18 pc11 pc04 pc13 pc05 pc06 pc12 pc07 vcc vss pc20 pc14 pc19 testout md3 testout2 md5 tck vssq vccq trst tdo tms tdi a09 a07 a05 pb12 pb02 d09 vcc d15 vcc d04 d00 vccq asemd nmi res a06 a04 a03 pb03 we0 / dqmll d08 vss d14 vss d05 d01 vcc(pll2) vcc(pll1) extal testmd vssq a02 a00 vss rd/( wr ) vssq d10 d12 md2 d07 d02 vssq vss(pll2) vssq xtal vccq a01 pb04 vcc we1 / dqmlu/ we vccq d11 d13 ckio d06 d03 vccq md1 vss(pll1) md0 12 3456789101112131415 a b c d e f g h j k l m n p r figure 1.2 pin assignments
section 1 overview rev. 4.00 sep. 13, 2007 page 7 of 502 rej09b0239-0400 1.4 pin functions table 1.1 pin functions classifi- cation abbr. i/o pin name description power supply vcc input power supply power supply for the internal logic of this lsi. all the vcc pins must be connected to the system power supply. this lsi does not operate correctly if there is a pin left open. vss input ground ground pins. all the vss pins must be connected to the system power supply (0 v) . this lsi does not operate correctly if there is a pin left open. vccq input power supply power supply for i nput/output pins. all the vccq pins must be connected to the system power supply. this lsi does not operate correctly if there is a pin left open. vssq input ground ground pins. all t he vssq pins must be connected to the system power supply (0 v) . this lsi does not operate correctly if there is a pin left open. clock vcc (pll1) input power supply for pll1 power supply pin for the on-chip pll1 oscillator vss (pll1) input ground for pll1 ground pin for the on-chip pll1 oscillator vcc (pll2) input power supply for pll2 power supply pin for the on-chip pll2 oscillator vss (pll2) input ground for pll2 ground pin for the on-chip pll2 oscillator extal input external clock connects to a cryst al resonator. an external clock is also input on this pin. for details on connection of an external clock, see section 8, clock pulse generator (cpg). xtal output crystal connects to a crystal resonator. ckio output system clock supplies the system clock to external devices. operating mode control md5, md3 to md0 input mode setting sets operating mode. t he signal levels of these pins must not be changed during operation. pins md2 to md0 are used for setting clock mode, pin md3 is for setting bus width mode for area 0, and pin md5 is for setting endian. system control res input power-on reset this lsi enters the reset state when this signal goes low.
section 1 overview rev. 4.00 sep. 13, 2007 page 8 of 502 rej09b0239-0400 classifi- cation abbr. i/o pin name description interrupt nmi input non-maskable interrupt non-maskable interrupt request signal. when this pin is not in use, this signal must be fixed high. irq7 to irq0 input interrupt request 7 to 0 maskable interrupt request pins. level-input or edge-input detection can be selected. when the edge-input detection is selected, the rising or falling edge can also be selected. address bus a25 to a0 output address bus outputs addresses. data bus d15 to d0 input/ output data bus 16-bit bidirectional bus bus control cs0 , cs3 , cs4 , cs5b , cs6b output chip select 0, 3, 4, 5b, 6b chip select signals for external memory and devices. rd output read indicates that data is read from an external device. rd/ wr output read/write read/write signal bs output bus cycle start indicates start of a bus cycle. we1 output upper side write indicates that bits 15 to 8 of data of external memory or devices are written to. we0 output lower side write indicates that bits 7 to 0 of data of external memory or devices are written to. wait input wait input pin used to insert wait cycles when accessing the external space ras output ras connects to the ras pin of sdram. cas output cas connects to the cas pin of sdram. cke output clock enable connects to the cke pin of sdram. dqmlu output upper side select selects bits 15 to 8 of sdram data bus. dqmll output lower side select selects bits 7 to 0 of sdram data bus. ce1a output pcmcia card select lower side chip enable for pcmcia allocated to area 5
section 1 overview rev. 4.00 sep. 13, 2007 page 9 of 502 rej09b0239-0400 classifi- cation abbr. i/o pin name description bus control ce1b output pcmcia card select lower side chip enable for pcmcia allocated to area 6 ce2a output pcmcia card select upper side chip enable for pcmcia allocated to area 5 ce2b output pcmcia card select upper side chip enable for pcmcia allocated to area 6 iciowr output pcmcia i/o write strobe connects to the pcmcia i/o write strobe pin. iciord output pcmcia i/o read strobe connects to the pcmcia i/o read strobe pin. we output pcmcia memory write strobe connects to the pcmcia memory write strobe. iois16 input pcmcia dynamic bus sizing in little endian mode, this signal indicates 16-bit bus width of pcmcia. in big endian mode, fix this pin low. serial communic ations interface with fifo txd2 to txd0 output transmit data transmit data pins rxd2 to rxd0 input receive data receive data pins sck2 to sck0 input/ output serial clock cl ock input pins rts1 and rts0 output transmit request modem control pin. supported only by scif0 and scif1. cts1 and cts0 input transmit enable modem control pin. supported only by scif0 and scif1. host interface hifd15 to hifd0 input/ output hif data bus address, data, and command input/output pins for the hif. hifcs input hif chip select chip select input for the hif
section 1 overview rev. 4.00 sep. 13, 2007 page 10 of 502 rej09b0239-0400 classifi- cation abbr. i/o pin name description host interface hifrs input hif register select controls the access type switching for the hif. hifwr input hif write write strobe signal hifrd input hif read read strobe signal hifint output hif interrupt interrupt request to external devices by the hif hifmd input hif mode specifies hif boot mode. hifdreq output hif dmac transfer request requests dmac transfer for the hifram to external devices. hifrdy output hif boot ready indicates that a reset of the hif has been cleared in this lsi and the hif is ready for accesses to it. hifebl input hif pin enable hif pins other than this pin ar e enabled by driving this pin high. user debugging interface (h-udi) tck input test clock test clock input pin tms input test mode select input pin for test mode select signal tdi input test data input serial input pin for an instruction and data tdo output test data output serial output pin for an instruction and data trst input test reset input pin for initialization i/o port pa25 to pa16 input/ output general port pins for 10-bit general input/output port pb13 to pb00 input/ output general port pins for 14-bit general input/output port pc20 to pc00 input/ output general port pins for 21-bit general input/output port pd07 to pd00 input/ output general port pins for 8-bit general input/output port pe24 to pe00 input/ output general port pins for 25-bit general input/output port
section 1 overview rev. 4.00 sep. 13, 2007 page 11 of 502 rej09b0239-0400 classifi- cation abbr. i/o pin name description emulator interface asemd input ase mode specifies ase mode. this lsi enters ase mode when this signal goes low and normal mode when this pin goes high. in ase mode, functions for the emulator are available. test mode testmd input test mode specifies test mode. this lsi enters test mode when th is signal goes low. fix this signal high. testout2 output test output output pin for testing. this pin should be open.
section 1 overview rev. 4.00 sep. 13, 2007 page 12 of 502 rej09b0239-0400 table 1.2 pin features pin no. pin name i/o features a1 v cc q power a2 pa25/a25 io/o a3 pa22/a22 io/o a4 v cc power a5 pa18/a18 io/o a6 pb08/( cs6b / ce1b ) io/o/o a7 v cc q power a8 pb05/ iciord io/o a9 rd o a10 a13 o a11 v ss power a12 a09 o a13 a06 o a14 v ss q power a15 v cc q power b1 v ss q power b2 pd7/irq7/sck2 io/i/io b3 pa24/a24 io/o b4 v ss power b5 pa19/a19 io/o b6 pa16/a16 io/o b7 v ss q power b8 pb06/ iciowr io/o b9 pb11/ cs4 io/o b10 a14 o b11 v cc power b12 a07 o b13 a04 o b14 a02 o b15 a01 o
section 1 overview rev. 4.00 sep. 13, 2007 page 13 of 502 rej09b0239-0400 pin no. pin name i/o features c1 pd3/irq3/rxd1 io/i/i c2 pd5/irq5/txd2 io/i/o c3 pd6/irq6/rxd2 io/i/i c4 pa21/a21 io/o c5 pa17/a17 io/o c6 pb07/ ce2b io/o c7 pb09/ ce2a io/o c8 pb00/ wait io/i c9 pb13/ bs io/o c10 a12 o c11 a10 o c12 a05 o c13 a03 o c14 a00 o c15 pb04/ ras io/o d1 pd0/irq0 io/i d2 pd2/irq2/txd1 io/i/o d3 pd4/irq4/sck1 io/i/io d4 pa23/a23 io/o d5 pa20/a20 io/o d6 pb10/( cs5b / ce1a ) io/o/o d7 pb01/ iois16 io/i d8 cs0 o d9 a15 o d10 a11 o d11 a08 o d12 pb12/ cs3 io/o d13 pb03/ cas io/o d14 v ss power d15 v cc power e1 v ss power
section 1 overview rev. 4.00 sep. 13, 2007 page 14 of 502 rej09b0239-0400 pin no. pin name i/o features e2 v cc power e3 pe08/ hifcs io/i e4 pd1/irq1 io/i e12 pb02/cke io/o e13 ( we0 /dqmll) o/o e14 rd/( wr ) o e15 ( we1 /dqmlu/ we ) o/o/o f1 pe22/hifd13/cts0 io/io/i f2 pe21/hifd12/rts0 io/io/o f3 pe23/hifd14/rts1 io/io/o f4 pe24/hifd15/cts1 io/io/i f12 d09 io f13 d08 io f14 v ss q power f15 v cc q power g1 pe18/hifd09/txd1 io/io/o g2 pe17/hifd08/sck0 io/io/io g3 pe19/hifd10/rxd1 io/io/i g4 pe20/hifd11/sck1 io/io/io g12 v cc power g13 v ss power g14 d10 io g15 d11 io h1 pe16/hifd07/rxd0 io/io/i h2 pe15/hifd06/txd0 io/io/o h3 v ss power h4 v cc power h12 d15 io h13 d14 io h14 d12 io h15 d13 io j1 pe12/hifd03 io/io
section 1 overview rev. 4.00 sep. 13, 2007 page 15 of 502 rej09b0239-0400 pin no. pin name i/o features j2 pe11/hifd02 io/io j3 pe13/hifd04 io/io j4 pe14/hifd05 io/io j12 v cc power j13 v ss power j14 md2 i j15 ckio io k1 v cc q power k2 v ss q power k3 pe09/hifd00 io/io k4 pe10/hifd01 io/io k12 d04 io k13 d05 io k14 d07 io k15 d06 io l1 pe06/ hifwr io/i l2 pe05/ hifrd io/i l3 pe07/hifrs io/i l4 pe04/ hifint io/o l12 d00 io l13 d01 io l14 d02 io l15 d03 io m1 v cc power m2 v ss power m3 pe03/hifmd io/i m4 pe01/hifrdy io/o m5 pc02 io m6 pc18 io m7 pc05 io m8 v cc power m9 pc19 io
section 1 overview rev. 4.00 sep. 13, 2007 page 16 of 502 rej09b0239-0400 pin no. pin name i/o features m10 md5 i m11 trst i m12 v cc q power m13 v cc (pll2) power m14 v ss q power m15 v cc q power n1 pe02/hifdreq io/o n2 pe00/hifebl io/i n3 pc09 io n4 pc08 io n5 pc10 io n6 pc11 io n7 pc06 io n8 v ss power n9 testout o n10 tck i n11 tdo o n12 asemd i n13 v cc (pll1) power n14 v ss (pll2) power n15 md1 i p1 pc17 io p2 pc16 io/ p3 pc15 io p4 pc01 io p5 v cc power p6 pc04 io p7 pc12 io p8 pc20 io p9 md3 i p10 v ss q power p11 tms i
section 1 overview rev. 4.00 sep. 13, 2007 page 17 of 502 rej09b0239-0400 pin no. pin name i/o features p12 nmi i p13 extal i p14 v ss q power p15 v ss (pll1) power r1 v cc q power r2 v ss q power r3 pc00 io r4 pc03 io r5 v ss power r6 pc13 io r7 pc07 io r8 pc14 io r9 testout2 o r10 v cc q power r11 tdi i r12 res i r13 testmd i r14 xtal o r15 md0 i
section 1 overview rev. 4.00 sep. 13, 2007 page 18 of 502 rej09b0239-0400
section 2 cpu rev. 4.00 sep. 13, 2007 page 19 of 502 rej09b0239-0400 section 2 cpu 2.1 features ? general registers: 32-bit register 16 ? basic instructions: 62 ? addressing modes: 11 register direct (rn) register indirect (@rn) post-increment regi ster indirect (@rn + ) pre-decrement register indirect (@-rn) register indirect with displacement (@disp:4, rn) index register indirect (@r0, rn) gbr indirect with disp lacement (@disp:8, gbr) index gbr indirect (@r0, gbr) pc relative with displacement (@disp:8, pc) pc relative (disp:8/disp:12/rn) immediate (#imm:8) 2.2 register configuration there are three types of registers: general registers (32-bit 16), control registers (32-bit 3), and system registers (32-bit 4).
section 2 cpu rev. 4.00 sep. 13, 2007 page 20 of 502 rej09b0239-0400 31 0 r0 * 1 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15, sp (hardware stack pointer)0 * 2 31 9 8 7 6 5 4 3 2 1 0 0 0 31 m gbr 31 vbr qi3i2i1i0 s t 31 0 mach 31 0 pr 31 0 pc macl notes: 1. r0 can be used as an index register in index register indirect or index gbr indirect addressing mode. for some instructions, only r0 is used as the source or destination register. 2. r15 is used as a hardware stack pointer during exception handling. general register (rn) status register (sr) global base register (gbr) vector base register (vbr) multiply and accumulate register (mac) procedure register (pr) program counter (pc) figure 2.1 cpu internal register configuration
section 2 cpu rev. 4.00 sep. 13, 2007 page 21 of 502 rej09b0239-0400 2.2.1 general registers (rn) there are sixteen 32-bit general registers (rn), designated r0 to r15. the general registers are used for data processing and addr ess calculation. r0 is also used as an index register. with a number of instructions, r0 is the only register that can be used. r15 is used as a hardware stack pointer (sp). in exception handling, r15 is used for accessing the stack to save or restore the status register (sr) and program counter (pc) values. 2.2.2 control registers there are three 32-bit control regi sters, designated status regist er (sr), global base register (gbr), and vector base register (vbr). sr indicates a processing state. gbr is used as a base address in gbr indirect addressing mode for data transfer of on-chip peripheral module registers. vbr is used as a base address of the exception handling (including interrupts) vector table.
section 2 cpu rev. 4.00 sep. 13, 2007 page 22 of 502 rej09b0239-0400 ? status register (sr) bit bit name default read/ write description 31 to 10 ? all 0 r/w reserved these bits are always read as 0. the write value should always be 0. 9 m undefined r/w used by the div0 u, div0s, and div1 instructions. 8 q undefined r/w used by the div0 u, div0s, and div1 instructions. 7 6 5 4 i3 i2 i1 i0 1 1 1 1 r/w r/w r/w r/w interrupt mask 3, 2 ? all 0 r/w reserved these bits are always read as 0. the write value should always be 0. 1 s undefined r/w s used by the multiply and accumulate instruction. 0 t undefined r/w t indicates true (1) or false (0) in the following instructions: movt, cmp/cond, tas, tst, bt (bt/s), bf (bf/s), sett, clrt indicates carry, borrow, overflow, or underflow in the following instructions: addv, addc, subv, subc, negc, div0u, div0s, di v1, shar, shal, shlr, shll, rotr, rotl, rotcr, rotcl ? global-base register (gbr) this register indicates a base address in gb r indirect addressing mode. the gbr indirect addressing mode is used for data transfer of the on-chip peripheral module registers and logic operations. ? vector-base register (vbr) this register indicates the base address of the exception handling vector table.
section 2 cpu rev. 4.00 sep. 13, 2007 page 23 of 502 rej09b0239-0400 2.2.3 system registers there are four 32-bit sy stem registers, designated two mu ltiply and accumulate registers (mach and macl), a procedure register (pr), and program counter (pc). ? multiply and accumulate registers (mac) this register stores the results of multipl ication and multiply-and -accumulate operation. ? procedure register (pr) this register stores the return-destination address from subroutine procedures. ? program counter (pc) the pc indicates the point which is four bytes (two instructions) after the current execution instruction. 2.2.4 initial values of registers table 2.1 lists the initial values of registers after a reset. table 2.1 initial values of registers type of register register default general register r0 to r14 undefined r15 (sp) sp value set in the exception handling vector table control register sr i3 to i0: 1111 (h'f) reserved bits: 0 other bits: undefined gbr undefined vbr h'00000000 system register mach, macl, pr undefined pc pc value set in the exception handling vector table
section 2 cpu rev. 4.00 sep. 13, 2007 page 24 of 502 rej09b0239-0400 2.3 data formats 2.3.1 register data format the size of register operands is always longwords (32 bits). when loading byte (8 bits) or word (16 bits) data in memory into a register, the data is sign-extended to longword and stored in the register. longword 31 0 figure 2.2 register data format 2.3.2 memory data formats memory data formats are classified into byte, word, and longword. byte data can be accessed from any address. if word data starting from boundary other than 2n or longword data starting from a boundary other than 4n is accessed, an address error will occur. in such cases, the data accessed cannot be guaranteed. see figure 2.3. byte 0 byte 1 byte 2 byte 3 word 0 word 1 longword big endian 31 23 15 7 address a + 1 address a + 4 address a + 8 address a address a address a + 3 address a + 2 0 byte 3 byte 2 byte 1 byte 0 word 1 word 0 longword little endian 31 23 15 7 address a + 10 address a + 4 address a + 8 address a + 11 address a address a + 8 address a + 9 0 figure 2.3 memory data format either big endian and little endian formats can be selected according to the mode pin setting at a reset. for details on mode pin settings, see section 7, bus state controller (bsc).
section 2 cpu rev. 4.00 sep. 13, 2007 page 25 of 502 rej09b0239-0400 2.3.3 immediate data formats immediate data of eight bits is placed in the instruction code. for the mov, add, and cmp/eq instructions, the immediate data is sign-extended to longword and then calculated. for the ts t, and, or, and xor instructio ns, the immediate data is zero- extended to longword and then calculated. thus, if the immedi ate data is used for the and instruction, the upper 24 bits in the destination register are always cleared. the immediate data of word or l ongword is not placed in the instruction code . it is placed in a table in memory. the table in memory is accesse d by the mov immediate data instruction in pc relative addressing m ode with displacement. 2.4 features of instructions 2.4.1 risc type the instructions are risc-type instru ctions with the fo llowing features: fixed 16-bit length: all instructions have a fixed length of 16 bits. this improves program code efficiency. one instruction per cycle: since pipelining is used, basic instructions can be executed in one cycle. one cycle is 25ns with 40 mhz operation. data size: the basic data size for operations is longword. byte, word, or longword can be selected as the memory access size. byte or word data in memory is sign-extended to longword and then calculated. immediate data is sign-extended to longword for arithmetic operations or zero-extended to longword si ze for logical operations. table 2.2 word data sign extension cpu in this lsi description example of other cpus mov.w @(disp,pc),r1 add r1,r0 ........ .data.w h'1234 sign-extended to 32 bits, r1 becomes h'00001234, and is then operated on by the add instruction. add.w #h'1234,r0 note: * immediate data is accessed by @(disp,pc).
section 2 cpu rev. 4.00 sep. 13, 2007 page 26 of 502 rej09b0239-0400 load/store architecture: basic operations are executed be tween registers. in operations involving memory, data is first loaded into a register (load/store architecture). however, bit manipulation instructions such as and are executed dir ectly in memory. delayed branching: unconditional branch instructions mean the delayed branch instructions. with a delayed branch instruction, the branch is made after execution of the instruction immediately following the delayed branch instruction. this minimizes disruption of the pipeline when a branch is made. the conditional branch instructions have two types of instructions: conditional branch instructions and delayed branch instructions. table 2.3 delayed branch instructions cpu in this lsi description example of other cpus bra trget add r1,r0 add is executed before branch to trget. add.w r1,r0 bra trget multiply/multiply-and-ac cumulate operations: a 16 16 32 multiply operation is executed in one to two cycles, and a 16 16 + 64 64 multiply-and-accumulate operation in two to three cycles. a 32 32 64 multiply operation and a 32 32 + 64 64 multiply-and- accumulate operation are each execu ted in two to four cycles. t bit: the result of a comparison is indicated by th e t bit in sr, and a conditional branch is performed according to whether the result is true or false. processing speed has been improved by keeping the number of instructions that modify the t bit to a minimum. table 2.4 t bit cpu in this lsi description example of other cpus cmp/ge r1,r0 when r0 r1, the t bit is set. cmp.w r1,r0 bt trget0 when r0 r1, a branch is made to trget0. bge trget0 bf trget1 when r0 < r1, a branch is made to trget1. blt trget1 add # ? 1,r0 the t bit is not c hanged by add. sub.w #1,r0 cmp/eq #0,r0 when r0 = 0, the t bit is set. beq trget bt trget a branch is made when r0 = 0. immediate data: 8-bit immediate data is placed in the instruction code. word and longword immediate data is not placed in the instruction code. it is placed in a table in memory. the table in memory is accessed with the mov immediate data instruction using pc relative addressing mode with displacement.
section 2 cpu rev. 4.00 sep. 13, 2007 page 27 of 502 rej09b0239-0400 table 2.5 access to immediate data type this lsi s cpu example of other cpu 8-bit immediate mov #h' 12,r0 mov.b #h'12,r0 16-bit immediate mov.w @(disp,pc),r0 ........ .data.w h'1234 mov.w #h'1234,r0 32-bit immediate mov.l @(disp,pc),r0 ........ .data.l h'12345678 mov.l #h'12345678, r0 note: * immediate data is accessed by @(disp,pc). absolute addresses: when data is accessed by absolute addr ess, place the absolute address value in a table in memory beforehand. the absolute addr ess value is transferred to a register using the method whereby immediate data is loaded when an instruction is executed, and the data is accessed using the register in direct addressing mode. table 2.6 access to absolute address type cpu in this lsi example of other cpus absolute address mov.l @(disp,pc),r1 mov.b @r1,r0 ........ .data.l h'12345678 mov.b @h'12345678, r0 note: * immediate data is referenced by @(disp,pc). 16-bit/32-bit displacement: when data is accessed using th e 16- or 32-bit displacement addressing mode, the displacement value is placed in a table in memory beforehand. using the method whereby immediate data is loaded when an instruction is executed, this value is transferred to a register and the data is accessed using index register indi rect addressing mode.
section 2 cpu rev. 4.00 sep. 13, 2007 page 28 of 502 rej09b0239-0400 table 2.7 access with displacement type cpu in this lsi example of other cpus 16-bit displacement mov.w @(disp,pc),r0 mov.w @(r0,r1),r2 ........ .data.w h'1234 mov.w @(h'1234,r1), r2 note: * immediate data is referenced by @(disp,pc). 2.4.2 addressing modes table 2.8 lists addressing modes and effective address calculation methods. table 2.8 addressing modes and effective addresses addressing mode instruction format effective address calculation method calculation formula register direct rn effective address is register rn. (operand is register rn contents.) ? register indirect @rn effective address is register rn contents. rn rn rn register indirect with post-increment @rn+ effective address is register rn contents. a constant is added to rn after instruction execution: 1 for a byte operand, 2 for a word operand, 4 for a longword operand. rn rn 1/2/4 + rn + 1/2/4 rn after instruction execution byte: rn + 1 rn word: rn + 2 rn longword: rn + 4 rn
section 2 cpu rev. 4.00 sep. 13, 2007 page 29 of 502 rej09b0239-0400 addressing mode instruction format effective address calculation method calculation formula register indirect with pre-decrement @?rn effective address is register rn contents, decremented by a constant beforehand: 1 for a byte operand, 2 for a word operand, 4 for a longword operand. rn rn - 1/2/4 1/2/4 - rn - 1/2/4 byte: rn ? 1 rn word: rn ? 2 rn longword: rn ? 4 rn (instruction executed with rn after calculation) register indirect with displacement @(disp:4, rn) effective address is register rn contents with 4-bit displacement disp added. after disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size. 1/2/4 disp (zero-extended) rn + disp 1/2/4 + rn byte: rn + disp word: rn + disp 2 longword: rn + disp 4 index register indirect @(r0, rn) effective address is sum of register rn and r0 contents. + rn r0 rn + r0 rn + r0 gbr indirect with displacement @(disp:8, gbr) effective address is register gbr contents with 8-bit displacement disp added. after disp is zero-extended, it is multiplied by 1 (byte), 2 (word), or 4 (longword), according to the operand size. gbr 1/2/4 disp (zero-extended) gbr + disp 1/2/4 + byte: gbr + disp word: gbr + disp 2 longword: gbr + disp 4
section 2 cpu rev. 4.00 sep. 13, 2007 page 30 of 502 rej09b0239-0400 addressing mode instruction format effective address calculation method calculation formula index gbr indirect @(r0, gbr) effective address is sum of register gbr and r0 contents. gbr gbr + r0 r0 + gbr + r0 pc relative with displacement @(disp:8, pc) effective address is pc with 8-bit displacement disp added. after disp is zero-extended, it is multiplied by 2 (word) or 4 (longword), according to the operand size. with a longword operand, the lower 2 bits of pc are masked. pc pc + disp 2 or pc& h'fffffffc + disp 4 h'fffffffc + & 2/4 disp (zero-extended) * * with longword operand word: pc + disp 2 longword: pc&h'fffffffc + disp 4 pc relative disp:8 effective address is pc with 8-bit displacement disp added after being sign-extended and multiplied by 2. pc 2 disp (sign-extended) pc + disp 2 + pc + disp 2 disp:12 effective address is pc with 12-bit displacement disp added after being sign-extended and multiplied by 2. pc 2 disp (sign-extended) pc + disp 2 + pc + disp 2
section 2 cpu rev. 4.00 sep. 13, 2007 page 31 of 502 rej09b0239-0400 addressing mode instruction format effective address calculation method calculation formula pc relative rn effective address is sum of pc and rn. pc pc + rn rn + pc + rn immediate #imm:8 8-bit immediate data imm of tst, and, or, or xor instruction is zero-extended. ? #imm:8 8-bit immediate data imm of mov, add, or cmp/eq instruction is sign-extended. ? #imm:8 8-bit immediate data imm of trapa instruction is zero-extended and multiplied by 4. ? 2.4.3 instruction formats this section describes the instruction formats, and the meaning of the source and destination operands. the meaning of the operands depends on the instruction code. the following symbols are used in the table. xxxx: instruction code mmmm: source register nnnn: destination register iiii: immediate data dddd: displacement
section 2 cpu rev. 4.00 sep. 13, 2007 page 32 of 502 rej09b0239-0400 table 2.9 instruction formats instruction format source operand destination operand sample instruction 0 type xxxx xxxx xxxx xxxx 15 0 ? ? nop ? nnnn : register direct movt rn control register or system register nnnn : register direct sts mach,rn n type xxxx nnnn xxxx xxxx 15 0 control register or system register nnnn : pre- decrement register indirect stc.l sr,@-rn mmmm : register direct control register or system register ldc rm,sr mmmm : post- increment register indirect control register or system register ldc.l @rm+,sr mmmm : register indirect ? jmp @rm m type xxxx mmmm xxxx xxxx 15 0 pc relative using rm ? braf rm
section 2 cpu rev. 4.00 sep. 13, 2007 page 33 of 502 rej09b0239-0400 instruction format source operand destination operand sample instruction mmmm : register direct nnnn : register direct add rm,rn mmmm : register direct nnnn : register indirect mov.l rm,@rn mmmm : post- increment register indirect (multiply- and-accumulate operation) nnnn : * post- increment register indirect (multiply- and-accumulate operation) mach, macl mac.w @rm+,@rn+ mmmm : post- increment register indirect nnnn : register direct mov.l @rm+,rn mmmm : register direct nnnn : pre- decrement register indirect mov.l rm,@-rn nm type xxxx nnnn mmmm xxxx 15 0 mmmm : register direct nnnn : index register indirect mov.l rm,@(r0,rn) md type xxxx xxxx mmmm dddd 15 0 mmmmdddd : register indirect with displacement r0 (register direct) mov.b @(disp,rm),r0 nd4 type xxxx xxxx nnnn dddd 15 0 r0 (register direct) nnnndddd : register indirect with displacement mov.b r0,@(disp,rn) mmmm : register direct nnnndddd : register indirect with displacement mov.l rm,@(disp,rn) nmd type xxxx nnnn mmmm dddd 15 0 mmmmdddd : register indirect with displacement nnnn : register direct mov.l @(disp,rm),rn
section 2 cpu rev. 4.00 sep. 13, 2007 page 34 of 502 rej09b0239-0400 instruction format source operand destination operand sample instruction dddddddd : gbr indirect with displacement r0 (register direct) mov.l @(disp,gbr),r0 r0 (register direct) dddddddd : gbr indirect with displacement mov.l r0,@(disp,gbr) dddddddd : pc relative with displacement r0 (register direct) mova @(disp,pc),r0 d type xxxx xxxx dddd dddd 15 0 ? dddddddd : pc relative bf label d12 type xxxx dddd dddd dddd 15 0 ? dddddddddddd : pc relative bra label (label=disp+pc) nd8 type xxxx nnnn dddd dddd 15 0 dddddddd : pc relative with displacement nnnn : register direct mov.l @(disp,pc),rn iiiiiiii : immediate index gbr indirect and.b #imm,@(r0,gbr) iiiiiiii : immediate r0 (register direct) and #imm,r0 i type xxxx xxxx iiii iiii 15 0 iiiiiiii : immediate ? trapa #imm ni type xxxx nnnn iiii iiii 15 0 iiiiiiii : immediate nnnn : register direct add #imm,rn note: * in multiply and accumulate instructions, nnnn is the source register.
section 2 cpu rev. 4.00 sep. 13, 2007 page 35 of 502 rej09b0239-0400 2.5 instruction set 2.5.1 instruction set by type table 2.10 lists the instruct ions classified by type. table 2.10 instruction types type kinds of instruction op code function number of instructions mov data transfer immediate data transfer peripheral module data transfer structure data transfer mova effective address transfer movt t bit transfer swap upper/lower swap data transfer instructions 5 xtrct extraction of middl e of linked registers 39 add binary addition addc binary addition with carry addv binary addition with overflow cmp/cond comparison div1 division div0s signed division initialization div0u unsigned division initialization dmuls signed double-precision multiplication dmulu unsigned double-precision multiplication dt decrement and test exts sign extension extu zero extension mac multiply-and-accumulate, double- precision multiply-and-accumulate arithmetic operation instructions 21 mul double-precision multiplication 33
section 2 cpu rev. 4.00 sep. 13, 2007 page 36 of 502 rej09b0239-0400 type kinds of instruction op code function number of instructions muls signed multiplication mulu unsigned multiplication neg sign inversion negc sign inversion with borrow sub binary subtraction subc binary subtraction with carry arithmetic operation instructions 21 subv binary subtraction with underflow 33 and logical and not bit inversion or logical or tas memory test and bit setting tst t bit setting for logical and logic operation instructions 6 xor exclusive logical or 14 rotl 1-bit left shift rotr 1-bit right shift rotcl 1-bit left shift with t bit rotcr 1-bit right shift with t bit shal arithmetic 1-bit left shift shar arithmetic 1-bit right shift shll logical 1-bit left shift shlln logical n-bit left shift shlr logical 1-bit right shift shift instructions 10 shlrn logical n-bit right shift 14
section 2 cpu rev. 4.00 sep. 13, 2007 page 37 of 502 rej09b0239-0400 type kinds of instruction op code function number of instructions bf conditional branch, delayed conditional branch (t = 0) bt conditional branch, delayed conditional branch (t = 1) bra unconditional branch braf unconditional branch bsr branch to subroutine procedure bsrf branch to subroutine procedure jmp unconditional branch jsr branch to subroutine procedure branch instructions 9 rts return from subroutine procedure 11 clrt t bit clear clrmac mac register clear ldc load into control register lds load into system register nop no operation rte return from exception handling sett t bit setting sleep transition to power-down mode stc store from control register sts store from system register system control instructions 11 trapa trap exception handling 31 total: 62 142
section 2 cpu rev. 4.00 sep. 13, 2007 page 38 of 502 rej09b0239-0400 the instruction code, operation, an d execution cycles of the instruct ions are listed in the following tables, classified by type. instruction instruction code summary of operation execution cycles t bit indicated by mnemonic. explanation of symbols op.sz src, dest op: operation code sz: size src: source dest: destination rm: source register rn: destination register imm: immediate data disp: displacement * 2 indicated in msb ? lsb order. explanation of symbols mmmm: source register nnnn: destination register 0000: r0 0001: r1 ......... 1111: r15 iiii: immediate data dddd: displacement indicates summary of operation. explanation of symbols , : transfer direction (xx): memory operand m/q/t: flag bits in sr &: logical and of each bit |: logical or of each bit ^: exclusive logical or of each bit ?: logical not of each bit <>n: n-bit right shift value when no wait cycles are inserted * 1 value of t bit after instruction is executed explanation of symbols ? : no change notes: 1. the table shows the minimum number of execution states. in practice, the number of instruction execution states will be incr eased in cases such as the following: ? when there is contention between an in struction fetch and a data access ? when the destination register of a load instruction (memory register) is also used by the following instruction 2. scaled ( 1, 2, or 4) according to the instruction operand size, etc. for details, see sh-1/sh-2/sh-dsp software manual.
section 2 cpu rev. 4.00 sep. 13, 2007 page 39 of 502 rej09b0239-0400 ? data transfer instructions instruction operation code execution cycles t bit mov #imm,rn imm sign extension rn 1110nnnniiiiiiii 1 ? mov.w @(disp,pc),rn (disp 2 + pc) sign extension rn 1001nnnndddddddd 1 ? mov.l @(disp,pc),rn (disp 4 + pc) rn 1101nnnndddddddd 1 ? mov rm,rn rm rn 0110nnnnmmmm0011 1 ? mov.b rm,@rn rm (rn) 0010nnnnmmmm0000 1 ? mov.w rm,@rn rm (rn) 0010nnnnmmmm0001 1 ? mov.l rm,@rn rm (rn) 0010nnnnmmmm0010 1 ? mov.b @rm,rn (rm) sign extension rn 0110nnnnmmmm0000 1 ? mov.w @rm,rn (rm) sign extension rn 0110nnnnmmmm0001 1 ? mov.l @rm,rn (rm) rn 0110nnnnmmmm0010 1 ? mov.b rm,@ ? rn rn?1 rn, rm (rn) 0010nnnnmmmm0100 1 ? mov.w rm,@ ? rn rn?2 rn, rm (rn) 0010nnnnmmmm0101 1 ? mov.l rm,@ ? rn rn?4 rn, rm (rn) 0010nnnnmmmm0110 1 ? mov.b @rm+,rn (rm) sign extension rn, rm + 1 rm 0110nnnnmmmm0100 1 ? mov.w @rm+,rn (rm) sign extension rn, rm + 2 rm 0110nnnnmmmm0101 1 ? mov.l @rm+,rn (rm) rn,rm + 4 rm 0110nnnnmmmm0110 1 ? mov.b r0,@(disp,rn) r0 (disp + rn) 10000000nnnndddd 1 ? mov.w r0,@(disp,rn) r0 (disp 2 + rn) 10000001nnnndddd 1 ? mov.l rm,@(disp,rn) rm (disp 4 + rn) 0001nnnnmmmmdddd 1 ? mov.b @(disp,rm),r0 (disp + rm) sign extension r0 10000100mmmmdddd 1 ? mov.w @(disp,rm),r0 (disp 2 + rm) sign extension r0 10000101mmmmdddd 1 ? mov.l @(disp,rm),rn (disp 4 + rm) rn 0101nnnnmmmmdddd 1 ? mov.b rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0100 1 ? mov.w rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0101 1 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 40 of 502 rej09b0239-0400 instruction operation code execution cycles t bit mov.l rm,@(r0,rn) rm (r0 + rn) 0000nnnnmmmm0110 1 ? mov.b @(r0,rm),rn (r0 + rm) sign extension rn 0000nnnnmmmm1100 1 ? mov.w @(r0,rm),rn (r0 + rm) sign extension rn 0000nnnnmmmm1101 1 ? mov.l @(r0,rm),rn (r0 + rm) rn 0000nnnnmmmm1110 1 ? mov.b r0,@(disp,gbr) r0 (disp + gbr) 11000000dddddddd 1 ? mov.w r0,@(disp,gbr) r0 (disp 2 + gbr) 11000001dddddddd 1 ? mov.l r0,@(disp,gbr) r0 (disp 4 + gbr) 11000010dddddddd 1 ? mov.b @(disp,gbr),r0 (disp + gbr) sign extension r0 11000100dddddddd 1 ? mov.w @(disp,gbr),r0 (disp 2 + gbr) sign extension r0 11000101dddddddd 1 ? mov.l @(disp,gbr),r0 (disp 4 + gbr) r0 11000110dddddddd 1 ? mova @(disp,pc),r0 disp 4 + pc r0 11000111dddddddd 1 ? movt rn t rn 0000nnnn00101001 1 ? swap.b rm,rn rm swap lowest two bytes rn 0110nnnnmmmm1000 1 ? swap.w rm,rn rm swap two consecutive words rn 0110nnnnmmmm1001 1 ? xtrct rm,rn rm: middle 32 bits of rn rn 0010nnnnmmmm1101 1 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 41 of 502 rej09b0239-0400 ? arithmetic operation instructions instruction operation code execution cycles t bit add rm,rn rn + rm rn 0011nnnnmmmm1100 1 ? add #imm,rn rn + imm rn 0111nnnniiiiiiii 1 ? addc rm,rn rn + rm + t rn, carry t 0011nnnnmmmm1110 1 carry addv rm,rn rn + rm rn, overflow t 0011nnnnmmmm1111 1 overflow cmp/eq #imm,r0 if r0 = imm, 1 t 10001000iiiiiiii 1 comparison result cmp/eq rm,rn if rn = rm, 1 t 0011nnnnmmmm0000 1 comparison result cmp/hs rm,rn if rn rm with unsigned data, 1 t 0011nnnnmmmm0010 1 comparison result cmp/ge rm,rn if rn rm with signed data, 1 t 0011nnnnmmmm0011 1 comparison result cmp/hi rm,rn if rn > rm with unsigned data, 1 t 0011nnnnmmmm0110 1 comparison result cmp/gt rm,rn if rn > rm with signed data, 1 t 0011nnnnmmmm0111 1 comparison result cmp/pz rn if rn 0, 1 t 0100nnnn00010001 1 comparison result cmp/pl rn if rn > 0, 1 t 0100nnnn00010101 1 comparison result cmp/str rm,rn if rn and rm have an equivalent byte, 1 t 0010nnnnmmmm1100 1 comparison result div1 rm,rn single-step division (rn/rm) 0011nnnnmmmm0100 1 calculation result div0s rm,rn msb of rn q, msb of rm m, m^ q t 0010nnnnmmmm0111 1 calculation result div0u 0 m/q/t 0000000000011001 1 0 dmuls.l rm,rn signed operation of rn rm mach, macl 32 32 64 bits 0011nnnnmmmm1101 2 to 5 * ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 42 of 502 rej09b0239-0400 instruction operation code execution cycles t bit dmulu.l rm,rn unsigned operation of rn rm mach, macl 32 32 64 bits 0011nnnnmmmm0101 2 to 5 * ? dt rn rn - 1 rn, if rn = 0, 1 t, else 0 t 0100nnnn00010000 1 comparison result exts.b rm,rn a byte in rm is sign- extended rn 0110nnnnmmmm1110 1 ? exts.w rm,rn a word in rm is sign- extended rn 0110nnnnmmmm1111 1 ? extu.b rm,rn a byte in rm is zero- extended rn 0110nnnnmmmm1100 1 ? extu.w rm,rn a word in rm is zero- extended rn 0110nnnnmmmm1101 1 ? mac.l @rm+,@rn+ signed operation of (rn) (rm) + mac mac, 32 32 + 64 64 bits 0000nnnnmmmm1111 2 to 5 * ? mac.w @rm+,@rn+ signed operation of (rn) (rm) + mac mac, 16 16 + 64 64 bits 0100nnnnmmmm1111 2 to 4 * ? mul.l rm,rn rn rm macl 32 32 32 bits 0000nnnnmmmm0111 2 to 5 * ? muls.w rm,rn signed operation of rn rm mac 16 16 32 bits 0010nnnnmmmm1111 1 (3) * ? mulu.w rm,rn unsigned operation of rn rm mac 16 16 32 bits 0010nnnnmmmm1110 1 (3) * ? neg rm,rn 0-rm rn 0110nnnnmmmm1011 1 ? negc rm,rn 0-rm-t rn, borrow t 0110nnnnmmmm1010 1 borrow sub rm,rn rn-rm rn 0011nnnnmmmm1000 1 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 43 of 502 rej09b0239-0400 instruction operation code execution cycles t bit subc rm,rn rn-rm?t rn, borrow t 0011nnnnmmmm1010 1 borrow subv rm,rn rn-rm rn, underflow t 0011nnnnmmmm1011 1 overflow note: * indicates the number of execution cycles for normal o peration. the values in parentheses indicate the number of exec ution cycles when conf licts occur with the previous or next instruction. ? logic operation instructions instruction operation code execution cycles t bit and rm,rn rn & rm rn 0010nnnnmmmm1001 1 ? and #imm,r0 r0 & imm r0 11001001iiiiiiii 1 ? and.b #imm,@(r0,gbr) (r0 + gbr) & imm (r0 + gbr) 11001101iiiiiiii 3 ? not rm,rn ~rm rn 0110nnnnmmmm0111 1 ? or rm,rn rn | rm rn 0010nnnnmmmm1011 1 ? or #imm,r0 r0 | imm r0 11001011iiiiiiii 1 ? or.b #imm,@(r0,gbr) (r0 + gbr) | imm (r0 + gbr) 11001111iiiiiiii 3 ? tas.b @rn if (rn) is 0, 1 t; 1 msb of (rn) 0100nnnn00011011 4 test result tst rm,rn rn & rm; if the result is 0, 1 t 0010nnnnmmmm1000 1 test result tst #imm,r0 r0 & imm; if the result is 0, 1 t 11001000iiiiiiii 1 test result tst.b #imm,@(r0,gbr) (r0 + gbr) & imm; if the result is 0, 1 t 11001100iiiiiiii 3 test result xor rm,rn rn ^ rm rn 0010nnnnmmmm1010 1 ? xor #imm,r0 r0 ^ imm r0 11001010iiiiiiii 1 ? xor.b #imm,@(r0,gbr) (r0 + gbr) ^ imm (r0 + gbr) 11001110iiiiiiii 3 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 44 of 502 rej09b0239-0400 ? shift instructions instruction operation code execution cycles t bit rotl rn t rn msb 0100nnnn00000100 1 msb rotr rn lsb rn t 0100nnnn00000101 1 lsb rotcl rn t rn t 0100nnnn00100100 1 msb rotcr rn t rn t 0100nnnn00100101 1 lsb shal rn t rn 0 0100nnnn00100000 1 msb shar rn msb rn t 0100nnnn00100001 1 lsb shll rn t rn 0 0100nnnn00000000 1 msb shlr rn 0 rn t 0100nnnn00000001 1 lsb shll2 rn rn << 2 rn 0100nnnn00001000 1 ? shlr2 rn rn >> 2 rn 0100nnnn00001001 1 ? shll8 rn rn << 8 rn 0100nnnn00011000 1 ? shlr8 rn rn >> 8 rn 0100nnnn00011001 1 ? shll16 rn rn << 16 rn 0100nnnn00101000 1 ? shlr16 rn rn >> 16 rn 0100nnnn00101001 1 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 45 of 502 rej09b0239-0400 ? branch instructions instruction operation code execution cycles t bit bf label if t = 0, disp 2 + pc pc; if t = 1, nop 10001011dddddddd 3/1 * ? bf/s label delayed branch, if t = 0, disp 2 + pc pc; if t = 1, nop 10001111dddddddd 2/1 * ? bt label if t = 1, disp 2 + pc pc; if t = 0, nop 10001001dddddddd 3/1 * ? bt/s label delayed branch, if t = 1, disp 2 + pc pc; if t = 0, nop 10001101dddddddd 2/1 * ? bra label delayed branch, disp 2 + pc pc 1010dddddddddddd 2 ? braf rm delayed branch, rm + pc pc 0000mmmm00100011 2 ? bsr label delayed branch, pc pr, disp 2 + pc pc 1011dddddddddddd 2 ? bsrf rm delayed branch, pc pr, rm + pc pc 0000mmmm00000011 2 ? jmp @rm delayed branch, rm pc 0100mmmm00101011 2 ? jsr @rm delayed branch, pc pr, rm pc 0100mmmm00001011 2 ? rts delayed branch, pr pc 0000000000001011 2 ? note: * one cycle when the branch is not executed.
section 2 cpu rev. 4.00 sep. 13, 2007 page 46 of 502 rej09b0239-0400 ? system control instructions instruction operation code execution cycles t bit clrt 0 t 0000000000001000 1 0 clrmac 0 mach, macl 0000000000101000 1 ? ldc rm,sr rm sr 0100mmmm00001110 6 lsb ldc rm,gbr rm gbr 0100mmmm00011110 4 ? ldc rm,vbr rm vbr 0100mmmm00101110 4 ? ldc.l @rm+,sr (rm) sr, rm + 4 rm 0100mmmm00000111 8 lsb ldc.l @rm+,gbr (rm) gbr, rm + 4 rm 0100mmmm00010111 4 ? ldc.l @rm+,vbr (rm) vbr, rm + 4 rm 0100mmmm00100111 4 ? lds rm,mach rm mach 0100mmmm00001010 1 ? lds rm,macl rm macl 0100mmmm00011010 1 ? lds rm,pr rm pr 0100mmmm00101010 1 ? lds.l @rm+,mach (rm) mach, rm + 4 rm 0100mmmm00000110 1 ? lds.l @rm+,macl (rm) macl, rm + 4 rm 0100mmmm00010110 1 ? lds.l @rm+,pr (rm) pr, rm + 4 rm 0100mmmm00100110 1 ? nop no operation 0000000000001001 1 ? rte delayed branch, stack area pc/sr 0000000000101011 5 ? sett 1 t 0000000000011000 1 1 sleep sleep 0000000000011011 4 * ? stc sr,rn sr rn 0000nnnn00000010 1 ? stc gbr,rn gbr rn 0000nnnn00010010 1 ? stc vbr,rn vbr rn 0000nnnn00100010 1 ? stc.l sr,@ ? rn rn?4 rn, sr (rn) 0100nnnn00000011 1 ? stc.l gbr,@ ? rn rn?4 rn, gbr (rn) 0100nnnn00010011 1 ? stc.l vbr,@ ? rn rn?4 rn, vbr (rn) 0100nnnn00100011 1 ? sts mach,rn mach rn 0000nnnn00001010 1 ?
section 2 cpu rev. 4.00 sep. 13, 2007 page 47 of 502 rej09b0239-0400 instruction operation code execution cycles t bit sts macl,rn macl rn 0000nnnn00011010 1 ? sts pr,rn pr rn 0000nnnn00101010 1 ? sts.l mach,@ ? rn rn?4 rn, mach (rn) 0100nnnn00000010 1 ? sts.l macl,@ ? rn rn?4 rn, macl (rn) 0100nnnn00010010 1 ? sts.l pr,@ ? rn rn?4 rn, pr (rn) 0100nnnn00100010 1 ? trapa #imm pc / sr stack area, (imm 4 + vbr) pc 11000011iiiiiiii 8 ? note: * number of execution cycles unt il this lsi enters sleep mode. about the number of execution cycles: the table lists the minimum number of ex ecution cycles. in practice, the number of execution cycles will be increased d epending on t he conditions such as: ? when there is a conflict between instruction fetch and data access ? when the destination register of a load instruction (memory register) is also used by the instruction immediatel y after the load instruction.
section 2 cpu rev. 4.00 sep. 13, 2007 page 48 of 502 rej09b0239-0400 2.6 processing states 2.6.1 state transition the cpu has the four processing states: reset, ex ception handling, program execution, and power- down. figure 2.4 shows the cpu state transition. note that some products do not support the manual reset function and the mres pin. software standby mode res = 0 in any state res = 1 and mres = 0 in any state power-on reset state manual reset state reset state request for internal power-on reset or internal manual reset by the wdt exception handling state request for exception handling end of exception handling program execution state sleep instruction by clearing ssby bit sleep instruction by setting ssby bit sleep mode request for nmi or irq interrupt power-down mode figure 2.4 cpu state transition
section 2 cpu rev. 4.00 sep. 13, 2007 page 49 of 502 rej09b0239-0400 ? reset state the cpu is reset. when the res pin is driven low, the cpu enters the power-on reset state. when the res pin is high and mres pin is low, the cpu enters the manual reset state. ? exception handling state this state is a transitional state in which the cpu processing state changes due to a request for exception handling such as a reset or an interrupt. when a reset occurs, the execu tion start address as the initial value of the program counter (pc) and the initial value of the stack pointer (sp) are fetched from the exception handling vector table. then, a branch is made fo r the start address to execute a program. when an interrupt occurs, the pc and status regist er (sr) are saved in the stack area pointed to by sp. the start address of an exception hand ling routine is fetched from the exception handling vector table and a branch to th e address is made to execute a program. then the processing state ente rs the program execution state. ? program execution state the cpu executes programs sequentially. ? power-down state the cpu stops to reduce power consumption. the sleep instruction makes the cpu enter sleep mode or software standby mode.
section 2 cpu rev. 4.00 sep. 13, 2007 page 50 of 502 rej09b0239-0400
section 3 cache rev. 4.00 sep. 13, 2007 page 51 of 502 rej09b0239-0400 section 3 cache 3.1 features ? capacity: 16 kbytes ? structure: instructions/data un ified, 4-way set associative ? line size: 16 bytes ? number of entries: 256 entries/way in 4-kbyte mode ? write method: write-back/write-through is selectable ? replacement method: least-r ecently-used (lru) algorithm 3.1.1 cache structure the cache holds both instructions and data and employs a 4-way set associative system. it is composed of four ways (banks), and each of which is divided into an address section and a data section. each of the address and data sections is divided into 256 entries. the data of an entry is called a line. each line consists of 16 bytes (4 bytes 4). the data capacity per way is 4 kbytes (16 bytes 256 entries), with a total of 16 kbytes in the cache (4 ways). figure 3.1 shows the cache structure. 24 (1 + 1 + 22) bits 128 (32 4) bits 6 bits lw0 to lw3: longword data 0 to 3 entry 0 entry 1 entry 255 0 1 255 0 1 255 v u tag address lw0 lw1 lw2 lw3 address array (ways 0 to 3) data array (ways 0 to 3) lru . . . . . . . . . . . . . . . . . . figure 3.1 cache structure
section 3 cache rev. 4.00 sep. 13, 2007 page 52 of 502 rej09b0239-0400 address array: the v bit indicates whether or not the entry data is valid. when the v bit is 1, data is valid; when 0, data is not valid. the u bit indicates whether or not the entry has been written to in write-back mode. when the u bit is 1, the entry has been written to; when 0, it has not. the tag address is composed of 22 bits (address bits 31 to 10) used for comparison during cache searches. in this lsi, the upper three bits of 32 address bits are used as shadow bits (see section 7, bus state controller (bsc)), therefore, the upper three bits of the ta g address are cleared to 0. the v and u bits are initialized to 0 by a power-on reset. the tag address is not initialized by a power-on reset. data array: holds 16-byte instruction and data. entries are registered in the cache in line units (16 bytes). the data array is not initialized by a power-on reset. lru: with the 4-way set associative system, up to fo ur instructions or data with the same entry address can be registered in the cache. when an entry is register ed, lru shows which of the four ways it is registered in. there are six lru bits , controlled by hardware. the least-recently-used (lru) algorithm is used to select the way. when a cache miss occurs, six lru bits indicate the way to be replaced. if a bit pattern other than those listed in table 3.1 is set in the lru bits by software, the cache will not function correctly. when changing the lru bits by software, set one of the patterns listed in table 3.1. the lru bits are initialized to 000000 by a power-on reset. table 3.1 lru and way to be replaced lru (bits 5 to 0) way to be replaced 000000, 000100, 010100, 100000, 110000, 110100 3 000001, 000011, 001011, 100001, 101001, 101011 2 000110, 000111, 001111, 010110, 011110, 011111 1 111000, 111001, 111011, 111100, 111110, 111111 0
section 3 cache rev. 4.00 sep. 13, 2007 page 53 of 502 rej09b0239-0400 3.1.2 divided areas and cache a 4-g byte address space is divide d into five areas with the arch itecture of this lsi. the cache access methods can be specified for each area. table 3.2 lists the corresponden ce between the divided areas and cache. table 3.2 correspondence between divided areas and cache address area cacheable cache operating control h'00000000 to h'7fffffff p0 ca cheable wt bit in ccr1 h'80000000 to h'9fffffff p1 ca cheable cb bit in ccr1 h'a0000000 to h'bfffffff p2 non cacheable ? h'c0000000 to h'dfffffff p3 cacheable wt bit in ccr1 h'e0000000 to h'ffffffff p4 non cacheable (internal i/o) ?
section 3 cache rev. 4.00 sep. 13, 2007 page 54 of 502 rej09b0239-0400 3.2 register descriptions the cache has the following registers. for details on register addresses and register states during each process, refer to sectio n 18, list of registers. ? cache control register 1 (ccr1) ? cache control register 3 (ccr3) 3.2.1 cache control register 1 (ccr1) the cache is enabled or disabled by the ce bit in ccr1. ccr1 also has the cf bit (which invalidates all cache entries), and the wt and cb bits (which select either write-through mode or write-back mode). programs that change the cont ents of ccr1 should be placed in the address space that is not cached. bit bit name initial value r/w description 31 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 cf 0 r/w cache flush writing 1 flushes all cache entries meaning that it clears the v, u, and lru bits of all cache entries to 0. this bit is always read as 0. write-back to external memory is not performed when the cache is flushed. 2 cb 0 r/w write-back indicates the cache operating mode for h'80000000 to h'9fffffff. 0: write-through mode 1: write-back mode 1 wt 0 r/w write-through indicates the cache operating mode for h'00000000 to h'7fffffff and h'c0 000000 to h'dfffffff. 0: write-back mode 1: write-through mode
section 3 cache rev. 4.00 sep. 13, 2007 page 55 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 ce 0 r/w cache enable indicates whether or not t he cache function is used. 0: cache function is not used. 1: cache function is used. 3.2.2 cache control register 3 (ccr3) ccr3 specifies the cache size. programs that change the contents of ccr3 should be placed in the address space that is not cached. bit bit name initial value r/w description 31 to 17 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 16 15 14 csize2 csize1 csize0 0 0 1 r/w r/w r/w cache size writing b'100 to these bits specifies the cache size 16 kbytes. write b'100 befor e enabling the cache by the ce bit in ccr1. 13 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3.3 operation 3.3.1 searching cache if the cache is enabled (the ce bit in ccr1 is set to 1), whenever an instruction or data in h'00000000 to h'7fffffff, h' 8000000 to h'9fffffff, and h' c0000000 to h'dfffffff is accessed, the cache will be searched to see if the de sired instruction or data is in the cache. figure 3.2 illustrates the method by which the cache is searched. entries are selected using bits 11 to 4 of the memory access addr ess and the tag address of that entry is read. the address comparison is performe d on all four ways. when the comparison shows a match and the selected entry is valid (v = 1), a cache hit occurs. when the comparison does not
section 3 cache rev. 4.00 sep. 13, 2007 page 56 of 502 rej09b0239-0400 show a match or the selected entry is not valid (v = 0), a cache miss occurs. figure 3.2 shows a hit on way 1. 0 1 255 v u tag address lw0 lw1 lw2 lw3 ways 0 to 3 ways 0 to 3 31 12 11 4 3 2 10 address cmp0 cmp1 cmp2 cmp3 cmp0: comparison circuit 0 cmp1: comparison circuit 1 cmp2: comparison circuit 2 cmp3: comparison circuit 3 hit signal 1 entry selection longword (lw) selection figure 3.2 cache search scheme 3.3.2 read access read hit: in a read access, instructions and data are transferred from the cache to the cpu. the lru bits are updated so that they po int to the most recently hit way.
section 3 cache rev. 4.00 sep. 13, 2007 page 57 of 502 rej09b0239-0400 read miss: an external bus cycle starts and the entry is updated. the way to be replaced is shown in table 3.1. data is updated in units of 16 bytes by updating the entry. when the desired instruction or data is loaded from external me mory to the cache, the instruction or data is transferred to the cpu in parallel. when it is loaded to the cache, the u bit is cleared to 0, the v bit is set to 1, the lru bits are updated so that they point to the most recently hit way. when the u bit of the entry which is to be replaced by entr y updating in write-back mode is 1, the cache- update cycle starts after the entry is transferred to the write-back buffer . after the cache completes its update cycle, the write-back buffer writes the en try back to the memory. transfer is in 16-byte units. 3.3.3 write access write hit: in a write access in write-back mode, the data is written to the cache and no external memory write cycle is generated. the u bit of the entry that has been written to is set to 1, and the lru bits are updated to indicate that the hit way is the most recently hit way. in write-through mode, the data is written to the cache and an extern al memory write cycle is generated. the u bit of the entry that has been written to is not updated, and the lru bits are updated to indicate that the hit way is the most recently hit way. write miss: in write-back mode, an external write cycl e starts when a write miss occurs, and the entry is updated. the way to be replaced is shown in table 3.1. when the u bit of the entry which is to be replaced by entry updating is 1, the cache-update cycle starts after the entry has been transferred to the write-back buffer. data is written to the cache and the u bit and the v bit are set to 1. the lru bits are updated to indicate that the replaced way is the mo st recently updated way. after the cache has completed its update cycle, th e write-back buffer writes the entry back to the memory. transfer is in 16-byte un its. in write-through mode, no wr ite to cache occurs in a write miss; the write is only to the external memory. 3.3.4 write-back buffer when the u bit of the entry to be replaced in write-back mode is 1, the entry must be written back to the external memory. to increas e performance, the entry to be re placed is first transferred to the write-back buffer and fetching of new entries to the cache takes priority over writing back to the external memory. after the fetching of new entrie s to the cache completes, the write-back buffer writes the entry back to the external memory. during the write-back cycles, the cache can be accessed. the write-back buffer can hold one line of cache data (16 bytes) and its physical address. figure 3.3 shows the configuration of the write-back buffer.
section 3 cache rev. 4.00 sep. 13, 2007 page 58 of 502 rej09b0239-0400 longword 0 longword 1 longword 2 longword 3 pa (31 to 4) pa (31 to 4): longword 0 to 3: physical address to be written to external memory one line of cache data to be written to external memory figure 3.3 write-back buffer configuration 3.3.5 coherency of cach e and external memory coherency between the cache and the external memory must be ensured by software. when memory shared by this lsi and another device is allocated to a cacheable address space, invalidate and write back the cache by accessing the memory-mapped cache, as required. 3.4 memory-mapped cache to allow software management of the cache, cache co ntents can be read from or written to by the mov instructions. the address array is allocated to addresses h'f0000000 to h'f0ffffff, and the data array to addresses h'f1000000 to h'f1ffffff. the address array and data array must be accessed in longwords, and instruc tion fetches cannot be performed. 3.4.1 address array the address array is allocated to h'f0000000 to h'f0ffffff. to access an address array, the 32- bit address field (for read/write accesses) and 32-bit data field (for write accesses) must be specified. the address field specifi es information for se lecting the entry to be accessed; the data field specifies the tag address, v bit, u bit, an d lru bits to be written to the address array. in the address field, specify the entry address for selecting the entry, w for selecting the way, a for enabling or disabling the a ssociative operation, and h'f0 fo r indicating address array access. as for w, 00 indicates way 0, 01 indicates way 1, 10 indicates way 2, and 11 indicates way 3. in the data field, specify the tag address, lru b its, u bit, and v bit. alwa ys clear the upper three bits (bits 31 to 29) of the tag address to 0. figure 3.4 shows the address and data formats. the following three operations are av ailable in the address array. address-array read: read the tag address, lru bits, u bit, and v bit for the entry that corresponds to the en try address and way specified by the address field of the read instruction. in reading, the associative operation is not performe d, regardless of whether the associa tive bit (a bit) specified in the address is 1 or 0.
section 3 cache rev. 4.00 sep. 13, 2007 page 59 of 502 rej09b0239-0400 address-array write (non-associative operation): write the tag address, lru bits, u bit, and v bit, specified by the data field of the write instruction, to the entry that corresponds to the entry address and way as specified by the address field of the write instruction. ensure that the associative bit (a bit) in the address field is set to 0. when writing to a cache line for which the u bit = 1 and the v bit =1, write the contents of the cache line back to memory, then write the tag address, lru bits, u bit, and v b it specified by the data field of the write instruction. when 0 is written to the v bit, 0 must also be written to the u bit for that entry. address-array write (associative operation): when writing with the associative bit (a bit) of the address field set to 1, the addresses in the four ways for the entry specified by the address field of the write instruction are compared with the tag ad dress that is specified by the data field of the write instruction. write the u bit and the v bit specified by the data field of the write instruction to the entry of the way that has a hit. however, the tag address and lru bits remain unchanged. when there is no way that has a hit, nothing is written and there is no operation. this function is used to invalidate a specific entry in the cache. when the u bit of the entry that has had a hit is 1 at this time, writing back should be performed. however, when 0 is written to the v bit, 0 must also be written to the u bit of that entry. 3.4.2 data array the data array is allocated to h'f1000000 to h'f1ffffff. to access a data array, the 32-bit address field (for read/write accesses) and 32-bit data field (for write acce sses) must be specified. the address field specifies info rmation for selecting the entry to be accessed; the data field specifies the longword data to be written to the data array. in the address field, specify the entry address for selecting the entry, l for indicating the longword position within the (16-byte) line, w for selecting the way, and h'f1 for indicating data array access. as for l, 00 indicates longword 0, 01 indi cates longword 1, 10 in dicates longword 2, and 11 indicates longword 3. as for w, 00 indi cates way 0, 01 indicates way 1, 10 indicates way 2, and 11 indicates way 3. since access size of the data array is fixed at longwo rd, bits 1 and 0 of the address field should be set to 00. figure 3.4 shows the address and data formats. the following two operations on the data array ar e available. the information in the address array is not affected by these operations. data-array read: read the data specified by l of the address field, from the entry that corresponds to th e entry address and the way that is specified by the address field.
section 3 cache rev. 4.00 sep. 13, 2007 page 60 of 502 rej09b0239-0400 data-array write: write the longword data specified by th e data field, to the position specified by l of the address field, in th e entry that corresponds to the en try address and the way specified by the address field. (1) address array access (a) address specification read access write access (b) data specification (both read and write accesses) (2) data array access (both read and write accesses) (a) address specification 1111 0000 * -------- * w entry address 1111 0000 * -------- * w entry address a 31 30 29 10 4 3 0 lru 2 x 00 0 x 9 tag address (28 to 10) u v 1 31 24 23 4 3 0 1111 0001 * -------- * w entry address 1 2 l (b) data specification 31 0 longword [legend] * : don't care x: 0 for read, don't care for write 0 00 28 * 0 0 31 24 23 4 3 0 1 2 31 24 23 14 13 12 11 14 13 12 11 14 13 12 11 43 0 1 2 * 00 figure 3.4 specifying a ddress and data for memo ry-mapped cache access
section 3 cache rev. 4.00 sep. 13, 2007 page 61 of 502 rej09b0239-0400 3.4.3 usage examples invalidating specific entries: specific cache entries can be invalidated by writing 0 to the entry's v bit in the memory-mapped cache access. when the a bit is 1, the tag address specified by the write data is compared to the tag address within the cache selected by the entry address, and the v bit and u bit specified by the write data are written when a match is found. if no match is found, there is no operation. when the v bit of an entry in the address array is set to 0, the entry is written back if the entry's u bit is 1. in the example shown below, r0 specifies the write data and r1 specifies the address. ; r0=h'01100010; vpn=b'0000 0001 0001 0000 0000 00, u=0, v=0 ; r1=h'f0000088; address array access, entry=b'00001000, a=1 ; mov.l r0,@r1 reading data of specific entry: the data section of a specific entry can be read from by the memory-mapped cache access. the longword indicated in the data field of the data array in figure 3.4 is read into the register. in the exam ple shown below, r0 specifies the address and r1 shows what is read. ; r0=h'f100004c; data array access, entry=b'00000100 ; way = 0, longword address = 3 ; mov.l @r0,r1 ; longword 3 is read.
section 3 cache rev. 4.00 sep. 13, 2007 page 62 of 502 rej09b0239-0400
section 4 u memory rev. 4.00 sep. 13, 2007 page 63 of 502 rej09b0239-0400 section 4 u memory this lsi has on-chip u memory which can be used to store instructions and data. 4.1 features features of the u memory are shown below. ? size 4 kbytes ? address h'e55f_f000 to h'e55f_ffff
section 4 u memory rev. 4.00 sep. 13, 2007 page 64 of 502 rej09b0239-0400
section 5 exception handling rev. 4.00 sep. 13, 2007 page 65 of 502 rej09b0239-0400 section 5 exception handling 5.1 overview 5.1.1 types of exception handling and priority exception handling is started by four sources: resets, address errors, interrupts and instructions and have the priority, as shown in table 5.1. when se veral exceptions are detected at once, they are processed according to the priority. table 5.1 types of exceptions and priority exception exception source priority reset power-on reset high h-udi reset interrupt user break (break bef ore instruction execution) address error cpu address error (instruction fetch) instruction general illegal inst ructions (undefined code) illegal slot instruction (undefined code placed immediately after a delayed branch instruction * 1 or instruction that changes the pc value * 2 ) trap instruction (trapa instruction) address error cpu address error (data access) interrupt user break (break after in struction execution or operand break) nmi h-udi irq watchdog timer (wdt) on-chip peripheral modules: compare match timer 0 and 1 (cmt0 and cmt1) serial communication interface with fifo (scif0, scif1, and scif2) host interface (hif) low notes: 1. delayed branch instructions: jmp, js r, bra, bsr, rts, rte, bf/s, bt/s, bsrf, and braf. 2. instructions that change the pc value: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf, ldc rm,sr, ldc.l @rm+,sr.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 66 of 502 rej09b0239-0400 5.1.2 exception handling operations the exceptions are detected and the exception ha ndling starts according to the timing shown in table 5.2. table 5.2 timing for exception detect ion and start of exception handling exception timing of source detect ion and start of exception handling reset power-on reset started when the res pin changes from low to high or when the wdt overflows. h-udi reset started when the reset assert command and the reset negate command are input to the h-udi in this order. address error interrupt detected during the instruction decode stage and started after the execution of the current in struction is completed. instruction trap instruction started by the ex ecution of the tr apa instruction. general illegal instructions started when an undefined code pl aced at other than a delay slot (immediately after a delayed branch instruction) is decoded. illegal slot instructions started when an undefined code placed at a delay slot (immediately after a delayed branch instruction) or an instruction that changes the pc value is detected. when exception handling starts, the cpu operates exception handling triggered by reset: the initial values of the program counter (pc) and stack pointer (sp) are fetched fr om the exception handling vector table (pc from the address h'a0000000 and sp from the address h'a0000004). for details, see section 5.1.3, exception handling vector table. h'00000000 is then written to the vector base register (vbr), and h'f (b'1111) is written to the interrupt mask bits (i 3 to i0) in the status register (sr). the program starts from the pc address fetched from the exception handling vector table. exception handling triggered by addres s error, interrupt, and instruction: sr and pc are saved to the stack indicated by r15. for interrupt exception handling, the interrupt priority level is written to the interrupt mask bits (i3 to i0) in sr. for address error and instruction exception handling, bits i3 to i0 are not affected. the start address is then fetched from the exception handling vector table and the program starts from that address.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 67 of 502 rej09b0239-0400 5.1.3 exception handling vector table before exception handling starts, the exception handling vector table must be set in memory. the exception handling vector table stores the start addresses of exception handling routines. (the reset exception handling table holds the initial values of pc and sp.) all exception sources are given different vector numbers and vector tabl e address offsets. the vector table addresses are calculated from these v ector numbers and vector table address offsets. during exception handling, the start addresses of the exception handling routines are fetched from the exception handling vector table that is indicated by this vector table address. table 5.3 shows the vector numbers and vector table address offsets. table 5.4 shows how vector table addresses are calculated. table 5.3 vector numbers and vector table address offsets exception handling source vector numb er vector table address offset power-on reset pc 0 h'00000000 to h'00000003 h-udi reset sp 1 h'00000004 to h'00000007 (reserved by system) 2 h'00000008 to h'0000000b 3 h'0000000c to h'0000000f general illegal instructio n 4 h'00000010 to h'00000013 (reserved by system) 5 h'00000014 to h'00000017 illegal slot instruction 6 h'00000018 to h'0000001b (reserved by system) 7 h'0000001c to h'0000001f 8 h'00000020 to h'00000023 cpu address error 9 h'00000024 to h'00000027 (reserved by system) 10 h'00000028 to h'0000002b interrupt nmi 11 h'0000002c to h'0000002f user break 12 h'00000030 to h'00000033 h-udi 13 h'00000034 to h'00000037 (reserved by system) 14 h'00000038 to h'0000003b : : 31 h'0000007c to h'0000007f
section 5 exception handling rev. 4.00 sep. 13, 2007 page 68 of 502 rej09b0239-0400 exception handling source vector numb er vector table address offset trap instruction (user vect or) 32 h'00000080 to h'00000083 : : 63 h'000000fc to h'000000ff interrupt irq0 64 h'00000100 to h'00000103 irq1 65 h'00000104 to h'00000107 irq2 66 h'00000108 to h'0000010b irq3 67 h'0000010c to h'0000010f (reserved by system) 68 h'00000110 to h'00000113 : : 79 h'0000013c to h'0000013f irq4 80 h'00000140 to h'00000143 irq5 81 h'00000144 to h'00000147 irq6 82 h'00000148 to h'0000014b irq7 83 h'0000014c to h'0000014f on-chip peripheral module * 84 h'00000120 to h'00000124 : : 255 h'000003fc to h'000003ff note: * for details on the vector numbers and vector table address offsets of on-chip peripheral module interrupts, see table 6.2 in se ction 6, interrupt controller (intc). table 5.4 calculating exception handling vector table addresses exception source vector table address calculation resets vector table address = h'a0000000 + (vector table address offset) = h'a0000000 + (vector number) 4 address errors, interrupts, instructions vector table address = vbr + (vector table address offset) = vbr + (vector number) 4 notes: 1. vbr: vector base register 2. vector table address offset: see table 5.3. 3. vector number: see table 5.3.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 69 of 502 rej09b0239-0400 5.2 resets 5.2.1 types of resets resets have priority over any exception source. as table 5.5 shows, a power-on reset initializes all modules in this lsi. table 5.5 reset status conditions for transition to reset state internal state type res wdt overflow h-udi command cpu, intc on-chip peripheral module pfc, i/o port low ? ? initialized initialized initialized power-on reset high overflow ? initialized initialized initialized h-udi reset high not overflowed reset assert command initialized initialized initialized 5.2.2 power-on reset power-on reset by res pin: when the res pin is driven low, this lsi enters the power-on reset state. to reliably reset this lsi, the res pin should be kept low for at least the oscillation settling time when applying the power or when in standby mode (when the clock is halted) or at least 20 tcyc when the clock is operating. during the power-on reset state, cpu internal states and all registers of on-chip peripheral modules are initialized. in the power-on reset state, power-on rese t exception handling starts when driving the res pin high after driving the pin low for the given time. the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception handling vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception handling vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3 to i0) of the status register (sr) are set to h'f (b'1111). 4. the values fetched from the exception handling vector table are set in pc and sp, then the program starts. be certain to always perform power-on reset ex ception handling when turning the system power on.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 70 of 502 rej09b0239-0400 power-on reset by wdt: when tcnt of the wdt overflows while a setting is made so that a power-on reset can be generated in watchdog timer mode of the wdt, this lsi enters the power- on reset state. if a reset caused by the signal input on the res pin and a reset caused by a wdt overflow occur simultaneously, the res pin reset has priority, and the wovf bit in rstcsr is cleared to 0. when the power-on reset exception handling caused by the wdt is started, the cpu operates as follows: 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception handling vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception handling vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3 to i0) of the status register (sr) are set to h'f (b'1111). 4. the values fetched from the exception handling vector table are set in the pc and sp, then the program starts. 5.2.3 h-udi reset the h-udi reset is generated by issuing the h- udi reset assert command . the cpu operation is described below. for details, see sectio n 17, user debuggin g interface (h-udi). 1. the initial value (execution start address) of the program counter (pc) is fetched from the exception handling vector table. 2. the initial value of the stack pointer (sp) is fetched from the exception handling vector table. 3. the vector base register (vbr) is cleared to h'00000000 and the interrupt mask bits (i3 to i0) in the status register (sr) are set to h'f (b'1111). 4. the values fetched from the exception handli ng vector table are set in pc and sp, then the program starts.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 71 of 502 rej09b0239-0400 5.3 address errors 5.3.1 address error sources address errors occur when instructions are fetched or data is read from or written to, as shown in table 5.6. table 5.6 bus cycles and address errors bus cycle type bus master bus cycl e description address errors cpu instruction fetched from even address none (normal) instruction fetch instruction fetched from odd address address error occurs cpu word data accessed from even address none (normal) data read/write word data accessed from odd address address error occurs longword data accessed from a longword boundary none (normal) longword data accessed from other than a long-word boundary address error occurs 5.3.2 address error exception source when an address error exception is generated, th e bus cycle which caused the address error ends, the current instruction finishes, and then the address error exception handling starts. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value to be saved is the start address of the instruction which cause d an address error exception. when the instruction that caused the exception is placed in the delay slot, the address of the delayed branch instruction which is placed immediately befo re the delay slot. 3. the start address of the exception handling routine is fetched from the exception handling vector table that corres ponds to the generated address error, and the program starts executing from that address. this branch is not a delayed branch.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 72 of 502 rej09b0239-0400 5.4 interrupts 5.4.1 interrupt sources table 5.7 shows the sources that start the interrupt exception handling. they are nmi, user break, h-udi, irq and on-chip peripheral modules. table 5.7 interrupt sources type request source number of sources nmi nmi pin (external input) 1 user break user break controller (ubc) 1 h-udi user debug interface (h-udi) 1 irq irq0 to irq7 pins (external input) 8 on-chip peripheral module watchdog timer (wdt) 1 compare match timer (cmt0 and cmt1) 2 serial communication interface with fifo (scif0, scif1, and scif2) 12 host interface (hif) 2 all interrupt sources are given different vector numbers and vector table address offsets. for details on vector numbers and vect or table address offsets, see ta ble 6.2 in section 6, interrupt controller (intc). 5.4.2 interrupt priority the interrupt priority is predetermined. when multiple interrupts occur simultaneously (overlapped interruptions), the interrupt controller (intc) determines their relative priorities and starts the exception handlin g according to the results. the priority of interrupts is expressed as priority levels 0 to 16, with priority 0 the lowest and priority 16 the highest. the nmi interrupt has prio rity 16 and cannot be masked, so it is always accepted. the priority level of th e user break interrupt and h-udi is 15. irq interrupt and on-chip peripheral module interrupt priority levels can be set freely using the interrupt priority level setting registers a to e (ipra to ipre) of the intc as shown in table 5.8. the priority levels that can be set are 0 to 15. level 16 cannot be set. for details on ipra to ipre, see section 6.3.4, interrupt priority registers a to e (ipr a to ipre).
section 5 exception handling rev. 4.00 sep. 13, 2007 page 73 of 502 rej09b0239-0400 table 5.8 interrupt priority type priority level comment nmi 16 fixed priority level. cannot be masked. user break 15 fixed priority level. can be masked. h-udi 15 fixed priority level. irq 0 to 15 on-chip peripheral module set with interrupt priority level setting registers a through e (ipra to ipre). 5.4.3 interrupt exception handling when an interrupt occurs, the interrupt controlle r (intc) ascertains its priority level. nmi is always accepted, but other interrupts are only accepted if they have a priority level higher than the priority level set in the interrupt mask bits (i3 to i0) of the status register (sr). when an interrupt is accepted, exception handlin g begins. in interrupt exception handling, the cpu saves sr and the program counter (pc) to the stack. the priority level of the accepted interrupt is written to bits i3 to i0 in sr. although the priority level of the nmi is 16, the value set in bits i3 to i0 is h'f (level 15). next, the start address of the exception handling routine is fetched from the exception handling vector table for the accepted interrupt, and program execution branches to that address and the program starts. fo r details on the interrupt exception handling, see section 6.6, interrupt operation.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 74 of 502 rej09b0239-0400 5.5 exceptions triggered by instructions 5.5.1 types of exceptions triggered by instructions exception handling can be triggered by the trap instruction, illegal slot instructions, and general illegal instructions, as shown in table 5.9. table 5.9 types of exceptions triggered by instructions type source instruction comment trap instruction trapa ? illegal slot instructions * undefined code placed immediately after a delayed branch instruction (delay slot) or instructions that changes the pc value delayed branch instructions: jmp, jsr, bra, bsr, rts, rte, bf/s, bt/s, bsrf, braf instructions that changes the pc value: jmp, jsr, bra, bsr, rts, rte, bt, bf, trapa, bf/s, bt/s, bsrf, braf, ldc rm,sr, ldc.l @rm+,sr general illegal instructions * undefined code anywhere besides in a delay slot ? note: * the operation is not guaranteed when undef ined instructions other than h'fc00 to h'ffff are decoded. 5.5.2 trap instructions when a trapa instruction is executed, the trap instruction exception handling starts. the cpu operates as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the start address of the instruction to be executed after the trapa instruction. 3. the cpu reads the start address of the exception handling routine from the exception handling vector table that corresponds to the vector number specified in th e trapa instruction, program execution branches to th at address, and then the progra m starts. this branch is not a delayed branch.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 75 of 502 rej09b0239-0400 5.5.3 illegal slot instructions an instruction placed imme diately after a delayed branch inst ruction is called ?instruction placed in a delay slot?. when the instruction placed in th e delay slot is an unde fined code, illegal slot exception handling starts after the undefined code is decoded. illegal slot exception handling also starts when an instruction that changes the prog ram counter (pc) value is placed in a delay slot and the instruction is decoded. the cpu handles an illegal slot instruction as follows: 1. the status register (sr) is saved to the stack. 2. the program counter (pc) is saved to the stack. the pc value saved is the target address of the delayed branch instruction immediately before the undefined code or the instruction that rewrites the pc. 3. the start address of the exception handling routine is fetched from the exception handling vector table that corres ponds to the exception that occurr ed. program execution branches to that address and the program starts. this branch is not a delayed branch. 5.5.4 general illegal instructions when an undefined code placed anywhere othe r than immediately after a delayed branch instruction (i.e., in a delay slot) is decoded, general illegal instruction exception handling starts. the cpu handles the general illegal instructions in the same procedures as in the illegal slot instructions. unlike processing of illegal slot instructions, however, the program counter value that is stacked is the start addr ess of the undefined code.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 76 of 502 rej09b0239-0400 5.6 cases when exceptions are accepted when an exception other than resets occurs during decoding the instruction placed in a delay slot or immediately after an in terrupt disabled instructio n, it may not be accepted and be held shown in table 5.10. in this case, when an instruction which accepts an in terrupt request is decoded, the exception is accepted. table 5.10 delay slot instructions, interr upt disabled instructions, and exceptions exception occurrence timing address error general illegal instruction slot illegal instruction trap instruction interrupt instruction in delay slot * 2 ? * 2 ? * 3 immediately after interrupt disabled instruction * 1 * 4 [legend] : accepted : not accepted ? : does not occur notes: 1. interrupt disabled instructions: ldc, ldc.l, stc, stc.l, lds, lds.l, sts, and sts.l 2. an exception is accepted before the execution of a delayed branch instruction. however, when an address error or a slot illegal instruction exception occurs in the delay slot of the rte instruction, correct operation is not guaranteed. 3. an exception is accepted after a delayed br anch (between instructions in the delay slot and the branch destination). 4. an exception is accepted after the exec ution of the next instru ction of an interrupt disabled instruction (before the execution two instructions after an interrupt disabled instruction).
section 5 exception handling rev. 4.00 sep. 13, 2007 page 77 of 502 rej09b0239-0400 5.7 stack states after exception handling ends the stack states after exception hand ling ends are shown in table 5.11. table 5.11 stack status a fter exception handling ends types stack state address error (when the instruction that caused an exception is placed in the delay slot) sp address of delayed branch instruction sr 32 bits 32 bits address error (other than above) sp sr 32 bits 32 bits address of instruction that caused exception interrupt sp sr 32 bits 32 bits address of instruction after executed instruction trap instruction sp sr 32 bits 32 bits address of instruction after trapa instruction
section 5 exception handling rev. 4.00 sep. 13, 2007 page 78 of 502 rej09b0239-0400 types stack state illegal slot instruction sp address of delayed branch instruction sr 32 bits 32 bits general illegal instruction sp sr 32 bits 32 bits address of general illegal instruction
section 5 exception handling rev. 4.00 sep. 13, 2007 page 79 of 502 rej09b0239-0400 5.8 usage notes 5.8.1 value of stack pointer (sp) the sp value must always be a multiple of 4. if it is not, an address error will occur when the stack is accessed during exception handling. 5.8.2 value of vector base register (vbr) the vbr value must always be a multiple of 4. if it is not, an address error will occur when the stack is accessed during exception handling. 5.8.3 address errors caused by stacking for address error exception handling when the sp value is not a multiple of 4, an address error will occur when stacking for exception handling (interrupts, etc.) and address error exception handling will start after the first exception handling is ended. address errors will also occur in the stacking for this address error exception handling. to ensure that address error exception handling does not go into an endless loop, no address errors are accepted at that point. this allows program cont rol to be passed to the handling routine for address error exceptio n and enables error processing. when an address error occurs during exception handling stacking, the stacking bus cycle (write) is executed. when stacking the sr and pc values , the sp values for both are subtracted by 4, therefore, the sp value is still not a multiple of 4 after the stacking. the address value output during stacking is the sp value whose lower two bits are cleared to 0. so th e write data stacked is undefined. 5.8.4 notes on slot illegal instruction exception handling some specifications on slot illegal instruction exception handling in this lsi differ from those on the conventional sh2. ? conventional sh2: instructions ldc rm,sr and ldc.l @rm + ,sr are not subject to the slot illegal instructions. ? this lsi: instructions ldc rm,sr and ldc.l @rm + ,sr are subject to the slot illegal instructions.
section 5 exception handling rev. 4.00 sep. 13, 2007 page 80 of 502 rej09b0239-0400 the supporting status on our software products regarding this note is as follows: compiler this instruction is not allocated in the delay slot in the compiler v.4 or later versions. real-time os for itron specifications 1. hi7000/4, hi-sh7 this instruction does not exist in the delay slot within the os. 2. hi7000 this instruction is in part allocated to the de lay slot within the os, which may cause the slot illegal instruction exception handling in this lsi. 3. others the slot illegal instruction exception handling may be generated in this lsi in case where the instruction is described in assembler or when the middleware of the object is introduced. note that a check-up program (checker) to pick up this instruction is available on our website. download and utilize this checker as needed.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 81 of 502 rej09b0239-0400 section 6 interrupt controller (intc) the interrupt controller (intc) ascertains the prior ity of interrupt sources and controls interrupt requests to the cpu. 6.1 features ? 16 levels of interrupt priority figure 6.1 shows a block diagram of the intc.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 82 of 502 rej09b0239-0400 nmi irq0 irq7 ubc h-udi wdt cmt0 cmt1 scif0 scif1 scif2 hif (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) (interrupt request) input control com- parator interrupt request sr cpu i3 i2 i1 i0 internal bus bus interface ipra to ipre icr0 irqsr irqcr module bus intc hif: host interface icr0: interrupt control register 0 irqcr: irq control register irqsr: irq status register ipra to ipre: interrupt priority registers a to e sr: status register ipr dter dtc [legend] ubc: user break controller h-udi: user debugging interface wdt: watchdog timer cmt: compare match timer scif: serial communications interface with fifo priority determination . . . . . . figure 6.1 intc block diagram
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 83 of 502 rej09b0239-0400 6.2 input/output pins table 6.1 shows the intc pin configuration. table 6.1 pin configuration name abbr. i/o function non-maskable interrupt input pin nmi input input of non-maskable interrupt request signal interrupt request input pins irq0 to irq7 input input of maskable interrupt request signals 6.3 register descriptions the interrupt controller has the following registers. for details on the addresses of these registers and the states of these registers in each processi ng state, see section 18, list of registers. ? interrupt control register 0 (icr0) ? irq control register (irqcr) ? irq status register (irqsr) ? interrupt priority register a (ipra) ? interrupt priority register b (iprb) ? interrupt priority register c (iprc) ? interrupt priority register d (iprd) ? interrupt priority register e (ipre)
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 84 of 502 rej09b0239-0400 6.3.1 interrupt contro l register 0 (icr0) icr0 is a 16-bit register that sets the input signal detection mode of the external interrupt input pin nmi and indicates the input signal level on the nmi pin. bit bit name initial value r/w description 15 nmil 1/0 r nmi input level indicates the state of the si gnal input to the nmi pin. this bit can be read to determine the nmi pin level. this bit cannot be modified. 0: state of the nmi input is low 1: state of the nmi input is high 14 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 nmie 0 r/w nmi edge select 0: interrupt request is det ected on the falling edge of the nmi input 1: interrupt request is detec ted on the rising edge of the nmi input 7 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 6.3.2 irq control register (irqcr) irqcr is a 16-bit register that sets the input signal detection mode of the external interrupt input pins irq0 to irq7.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 85 of 502 rej09b0239-0400 bit bit name initial value r/w description 15 14 irq71s irq70s 0 0 r/w r/w irq7 sense select set the interrupt request detection mode for pin irq7. 00: interrupt request is det ected at the low level of pin irq7 01: interrupt request is detected at the falling edge of pin irq7 10: interrupt request is detected at the rising edge of pin irq7 11: interrupt request is det ected at both the falling and rising edges of pin irq7 13 12 irq61s irq60s 0 0 r/w r/w irq6 sense select set the interrupt request detection mode for pin irq6. 00: interrupt request is det ected at the low level of pin irq6 01: interrupt request is detected at the falling edge of pin irq6 10: interrupt request is detected at the rising edge of pin irq6 11: interrupt request is det ected at both the falling and rising edges of pin irq6 11 10 irq51s irq50s 0 0 r/w r/w irq5 sense select set the interrupt request detection mode for pin irq5. 00: interrupt request is det ected at the low level of pin irq5 01: interrupt request is detected at the falling edge of pin irq5 10: interrupt request is detected at the rising edge of pin irq5 11: interrupt request is det ected at both the falling and rising edges of pin irq5
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 86 of 502 rej09b0239-0400 bit bit name initial value r/w description 9 8 irq41s irq40s 0 0 r/w r/w irq4 sense select set the interrupt request detection mode for pin irq4. 00: interrupt request is det ected at the low level of pin irq4 01: interrupt request is detected at the falling edge of pin irq4 10: interrupt request is detected at the rising edge of pin irq4 11: interrupt request is det ected at both the falling and rising edges of pin irq4 7 6 irq31s irq30s 0 0 r/w r/w irq3 sense select set the interrupt request detection mode for pin irq3. 00: interrupt request is det ected at the low level of pin irq3 01: interrupt request is detected at the falling edge of pin irq3 10: interrupt request is detected at the rising edge of pin irq3 11: interrupt request is det ected at both the falling and rising edges of pin irq3 5 4 irq21s irq20s 0 0 r/w r/w irq2 sense select set the interrupt request detection mode for pin irq2. 00: interrupt request is det ected at the low level of pin irq2 01: interrupt request is detected at the falling edge of pin irq2 10: interrupt request is detected at the rising edge of pin irq2 11: interrupt request is det ected at both the falling and rising edges of pin irq2
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 87 of 502 rej09b0239-0400 bit bit name initial value r/w description 3 2 irq11s irq10s 0 0 r/w r/w irq1 sense select set the interrupt request detection mode for pin irq1. 00: interrupt request is det ected at the low level of pin irq1 01: interrupt request is detected at the falling edge of pin irq1 10: interrupt request is detected at the rising edge of pin irq1 11: interrupt request is det ected at both the falling and rising edges of pin irq1 1 0 irq01s irq00s 0 0 r/w r/w irq0 sense select set the interrupt request detection mode for pin irq0. 00: interrupt request is det ected at the low level of pin irq0 01: interrupt request is detected at the falling edge of pin irq0 10: interrupt request is detected at the rising edge of pin irq0 11: interrupt request is det ected at both the falling and rising edges of pin irq0
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 88 of 502 rej09b0239-0400 6.3.3 irq status register (irqsr) irqsr is a 16-bit register that indicates the states of the external interrupt input pins irq0 to irq7 and the status of interrupt request. bit bit name initial value r/w description 15 irq7l 0/1 r indicates the state of pin irq7. 0: state of pin irq7 is low 1: state of pin irq7 is high 14 irq6l 0/1 r indicates the state of pin irq6. 0: state of pin irq6 is low 1: state of pin irq6 is high 13 irq5l 0/1 r indicates the state of pin irq5. 0: state of pin irq5 is low 1: state of pin irq5 is high 12 irq4l 0 or 1 r indicates the state of pin irq4. 0: state of pin irq4 is low 1: state of pin irq4 is high 11 irq3l 0 or 1 r indicates the state of pin irq3. 0: state of pin irq3 is low 1: state of pin irq3 is high 10 irq2l 0 or 1 r indicates the state of pin irq2. 0: state of pin irq2 is low 1: state of pin irq2 is high 9 irq1l 0 or 1 r indicates the state of pin irq1. 0: state of pin irq1 is low 1: state of pin irq1 is high 8 irq0l 0 or 1 r indicates the state of pin irq0. 0: state of pin irq0 is low 1: state of pin irq0 is high
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 89 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 irq7f 0 r/w indicates the status of an irq7 interrupt request. ? when level detection mode is selected 0: an irq7 interrupt has not been detected [clearing condition] driving pin irq7 high 1: an irq7 interrupt has been detected [setting condition] driving pin irq7 low ? when edge detection mode is selected 0: an irq7 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq7f = 1 ? accepting an irq7 interrupt 1: an irq7 interrupt request has been detected [setting condition] detecting the specified edge of pin irq7
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 90 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 irq6f 0 r/w indicates the status of an irq6 interrupt request. ? when level detection mode is selected 0: an irq6 interrupt has not been detected [clearing condition] driving pin irq6 high 1: an irq6 interrupt has been detected [setting condition] driving pin irq6 low ? when edge detection mode is selected 0: an irq6 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq6f = 1 ? accepting an irq6 interrupt 1: an irq6 interrupt request has been detected [setting condition] detecting the specified edge of pin irq6 5 irq5f 0 r/w indicates the status of an irq5 interrupt request. ? when level detection mode is selected 0: an irq5 interrupt has not been detected [clearing condition] driving pin irq5 high 1: an irq5 interrupt has been detected [setting condition] driving pin irq5 low ? when edge detection mode is selected 0: an irq5 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq5f = 1 ? accepting an irq5 interrupt 1: an irq5 interrupt request has been detected [setting condition] detecting the specified edge of pin irq5
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 91 of 502 rej09b0239-0400 bit bit name initial value r/w description 4 irq4f 0 r/w indicates the status of an irq4 interrupt request. ? when level detection mode is selected 0: an irq4 interrupt has not been detected [clearing condition] driving pin irq4 high 1: an irq4 interrupt has been detected [setting condition] driving pin irq4 low ? when edge detection mode is selected 0: an irq4 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq4f = 1 ? accepting an irq4 interrupt 1: an irq4 interrupt request has been detected [setting condition] detecting the specified edge of pin irq4 3 irq3f 0 r/w indicates the status of an irq3 interrupt request. ? when level detection mode is selected 0: an irq3 interrupt has not been detected [clearing condition] driving pin irq3 high 1: an irq3 interrupt has been detected [setting condition] driving pin irq3 low ? when edge detection mode is selected 0: an irq3 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq3f = 1 ? accepting an irq3 interrupt 1: an irq3 interrupt request has been detected [setting condition] detecting the specified edge of pin irq3
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 92 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 irq2f 0 r/w indicates the status of an irq2 interrupt request. ? when level detection mode is selected 0: an irq2 interrupt has not been detected [clearing condition] driving pin irq2 high 1: an irq2 interrupt has been detected [setting condition] driving pin irq2 low ? when edge detection mode is selected 0: an irq2 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq2f = 1 ? accepting an irq2 interrupt 1: an irq2 interrupt request has been detected [setting condition] detecting the specified edge of pin irq2 1 irq1f 0 r/w indicates the status of an irq1 interrupt request. ? when level detection mode is selected 0: an irq1 interrupt has not been detected [clearing condition] driving pin irq1 high 1: an irq1 interrupt has been detected [setting condition] driving pin irq1 low ? when edge detection mode is selected 0: an irq1 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq1f = 1 ? accepting an irq1 interrupt 1: an irq1 interrupt request has been detected [setting condition] detecting the specified edge of pin irq1
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 93 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 irq0f 0 r/w indicates the status of an irq0 interrupt request. ? when level detection mode is selected 0: an irq0 interrupt has not been detected [clearing condition] driving pin irq0 high 1: an irq0 interrupt has been detected [setting condition] driving pin irq0 low ? when edge detection mode is selected 0: an irq0 interrupt has not been detected [clearing conditions] ? writing 0 after reading irq0f = 1 ? accepting an irq0 interrupt 1: an irq0 interrupt request has been detected [setting condition] detecting the specified edge of pin irq0
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 94 of 502 rej09b0239-0400 6.3.4 interrupt prio rity registers a to e (ipra to ipre) interrupt priority registers are five 16-bit readable/w ritable registers that set priority levels from 0 to 15 for interrupts except nmi. for the corr espondence between interr upt request sources and ipr, refer to table 6.2. each of the corresponding interrupt priority ranks are established by setting a value from h'0 to h'f in each of the four-bit groups 15 to 12, 11 to 8, 7 to 4 and 3 to 0. reserved bits that are not assigned should be set h'0 (b'0000). bit bit name initial value r/w description 15 14 13 12 ipr15 ipr14 ipr13 ipr12 0 0 0 0 r/w r/w r/w r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest)
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 95 of 502 rej09b0239-0400 bit bit name initial value r/w description 11 10 9 8 ipr11 ipr10 ipr9 ipr8 0 0 0 0 r/w r/w r/w r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest)
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 96 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 5 4 ipr7 ipr6 ipr5 ipr4 0 0 0 0 r/w r/w r/w r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest)
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 97 of 502 rej09b0239-0400 bit bit name initial value r/w description 3 2 1 0 ipr3 ipr2 ipr1 ipr0 0 0 0 0 r/w r/w r/w r/w set priority levels for the corresponding interrupt source. 0000: priority level 0 (lowest) 0001: priority level 1 0010: priority level 2 0011: priority level 3 0100: priority level 4 0101: priority level 5 0110: priority level 6 0111: priority level 7 1000: priority level 8 1001: priority level 9 1010: priority level 10 1011: priority level 11 1100: priority level 12 1101: priority level 13 1110: priority level 14 1111: priority level 15 (highest) note: name in the tables above is represented by a general name. name in the list of register is, on the other hand, represent ed by a module name.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 98 of 502 rej09b0239-0400 6.4 interrupt sources 6.4.1 external interrupts there are five types of interrupt sources: user break, nmi, h-udi, irq, and on-chip peripheral modules. individual interrupts are given priority levels (0 to 16, with 0 the lowest and 15 the highest). giving an interrupt a priority level of 0 masks it. nmi interrupt: the nmi interrupt is given a priority leve l of 16 and is always accepted. an nmi interrupt is detected at the edge of the pins. use the nmi edge select bit (nmie) in interrupt control register 0 (icr0) to select either the rising or falling edge. in the nmi interrupt exception handler, the interrupt mask level bits (i3 to i0) in the status register (sr) are set to level 15. irq7 to irq0 interrupts: irq interrupts are requested by input from pins irq0 to irq7. use the irq sense select bits (irq71s to irq 01s and irq70s to irq00s) in the irq control register (irqcr) to select the detection mode from low level detection, falling edge detection, rising edge detection, and both edge detection for each pin. the priority level can be set from 0 to 15 for each pin using the interrupt priority registers a and b (ipra and iprb). in the case that the low level detection is selected, an interrupt request signal is sent to the intc while the irq pin is driven low. the interrupt request signal stops to be sent to the intc when the irq pin becomes high. it is possible to confirm that an interrupt is requested by reading the irq flags (irq7f to irq0f) in the irq status register (irqsr). in the case that the edge detection is selected, an interrupt request signal is sent to the intc when the following change on the irq pin is detected: from high to low in falling edge detection mode, from low to high in rising edge detection mode, and from low to high or from high to low in both edge detection mode. the irq interrupt request by detecting the change on the pin is held until the interrupt request is accepted. it is possible to confirm that an irq interrupt request has been detected by reading the irq flags (irq7f to irq0f) in the irq status register (irqsr). an irq interrupt request by detecting the change on the pin can be withdrawn by writing 0 to an irq flag after reading 1. in the irq interrupt exception handling, the interrup t mask bits (i3 to i0) in the status register (sr) are set to the prio rity level value of the accepted irq in terrupt. figure 6.2 shows the block diagram of the irq7 to irq0 interrupts.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 99 of 502 rej09b0239-0400 irqcr.irqn1s irqcr.irqn0s irqsr.irqnf irqsr.irqnl irqn pins resirqn level detection edge detection sq r selection cpu interrupt request (acceptance of irqn interrupt/ writing 0 after reading irqnf = 1) n = 7 to 0 figure 6.2 block diagram of irq7 to irq0 interrupts control 6.4.2 on-chip peripheral module interrupts on-chip peripheral module interrupts are interrupts generated by the following on-chip peripheral modules. since a different interrupt vect or is allocated to each interr upt source, the exception handling routine does not have to decide which interrupt has occurred. priority levels between 0 and 15 can be allocated to individual on-chip peripheral modules in interrupt priority registers c to e (iprc to ipre). on-chip peripheral module interrupt exception handling sets the interrupt mask level bits (i3 to i0) in the status register (sr) to the priority level value of th e on-chip peripheral module interrupt that was accepted. 6.4.3 user break interrupt a user break interrupt has a priority level of 15, and occurs when the break condition set in the user break controller (ubc) is satisfied. user break interrupt requests are detected by edge and are held until accepted. user br eak interrupt exception handling sets the interrupt mask level bits (i3 to i0) in the status register (sr) to level 15. for more details on the user break interrupt, see section 16, user break controller (ubc).
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 100 of 502 rej09b0239-0400 6.4.4 h-udi interrupt user debugging interface (h -udi) interrupt has a priority level of 15, a nd occurs when an h-udi interrupt instruction is serially input. h-udi interrupt requests are detected by edge and are held until accepted. h-udi exceptio n handling sets the interrupt mask level bits (i3-i0) in the status register (sr) to level 15. for more details on the h-udi interrupt, see section 17, user debugging interface (h-udi). 6.5 interrupt exception handling vector table table 6.2 lists interrupt sources, their vector numbers, vector table address offsets, and interrupt priorities. individual interrupt sources are allocated to different vector numbers and vector table address offsets. vector table addresses are calculated fr om the vector numbers and vector table address offsets. for interrupt exception handling, the start address of the exception handling routine is fetched from the vector table addres s in the vector table. for the de tails on calculation of vector table addresses, see table 5.4, calculating exception handling vector table addresses in section 5, exception handling. irq interrupts and on-chip peripheral module in terrupt priorities can be set freely between 0 and 15 for each pin or module by setting interrupt priority registers a to e (ipra to ipre). however, when interrupt sources whose priority levels are al located with the same ipr are requested, the interrupt of the smaller vector number has priority. this priority cannot be changed. priority levels of irq interrupts and on-chip peripheral module interrupts are initialized to level 0 at a power-on reset. if the same priority level is allocated to two or mo re interrupt sources and interrupts from those sources occur simultaneously, they are processed by the default priority order shown in table 6.2.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 101 of 502 rej09b0239-0400 table 6.2 interrupt exception ha ndling vectors and priorities interrupt source name vector no. vector table starting address ipr default priority user break 12 h'00000030 ? high external pin nmi 11 h'0000002c ? h-udi 13 h'00000034 ? external pin irq0 64 h'00000100 ipra15 to ipra12 irq1 65 h'00000104 ipra11 to ipra8 irq2 66 h'00000108 ipra7 to ipra4 irq3 67 h'0000010c ipra3 to ipra0 irq4 80 h'00000140 iprb15 to iprb12 irq5 81 h'00000144 iprb11 to iprb8 irq6 82 h'00000148 iprb7 to iprb4 irq7 83 h'0000014c iprb3 to iprb0 wdt iti 84 h'00000150 iprc15 to iprc12 cmt channel 0 cmi0 86 h'00000158 iprc7 to iprc4 cmt channel 1 cmi1 87 h'0000015c iprc3 to iprc0 eri_0 88 h'00000160 iprd15 to iprd12 rxi_0 89 h'00000164 bri_0 90 h'00000168 scif channel 0 txi_0 91 h'0000016c eri_1 92 h'00000170 iprd11 to iprd8 rxi_1 93 h'00000174 bri_1 94 h'00000178 scif channel 1 txi_1 95 h'0000017c eri_2 96 h'00000180 iprd7 to iprd4 rxi_2 97 h'00000184 bri_2 98 h'00000188 scif channel 2 txi_2 99 h'0000018c hif hifi 100 h'00000190 ipre15 to ipre12 hifbi 101 h'00000194 ipre11 to ipre8 low
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 102 of 502 rej09b0239-0400 6.6 interrupt operation 6.6.1 interrupt sequence the sequence of interrupt operations is explained below. figure 6.3 is a flowchart of the operations. 1. the interrupt request sources send interrupt request signals to the interrupt controller. 2. the interrupt controller selects the highest pr iority interrupt from interrupt requests sent, according to the priority levels se t in interrupt priority level se tting registers a to e (ipra to ipre). interrupts that have lower-priority than that of the selected in terrupt are ignored*. if interrupts that have the same priority level or interrupts within a same module occur simultaneously, the interrupt with the highest pr iority is selected acco rding to the priority shown in table 6.2. 3. the interrupt controller compares the priority level of the selected interrupt request with the interrupt mask bits (i3 to i0) in the status regist er (sr) of the cpu. if the priority level of the selected request is equal to or less than the level set in bits i3 to i0, the request is ignored. if the priority level of the selected request is higher than the level in bits i3 to i0, the interrupt controller accepts the request and sends an interrupt request signal to the cpu. 4. the cpu detects the interrupt request sent from the interrupt controller in the decode stage of an instruction to be executed. instead of exec uting the decoded instruction, the cpu starts interrupt exception handling (see figure 6.5). 5. sr and pc are saved onto the stack. 6. the priority level of the accepted interr upt is copied to bits (i3 to i0) in sr. 7. the cpu reads the start address of the excep tion handling routine from the exception vector table for the accepted interrupt, branches to that address, and starts executing th e program. this branch is not a delayed branch. note: * interrupt requests that are designated as edge-detect type are held pending until the interrupt requests are accepted. irq interrupt s, however, can be cancelled by accessing the irq status register (irqsr). interrupts held pending due to edge detection are cleared by a power-on rese t or an h-udi reset.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 103 of 502 rej09b0239-0400 program execution state interrupt? user break? i3 to i0 level 14? level 14 interrupt? level 1 interrupt? i3 to i0 level 13? i3 to i0 = level 0? no yes no no no no no no no no yes yes yes yes yes yes yes yes save sr to stack save pc to stack copy interrupt level to i3 to i0 read exception vector table branch to exception handling routine h-udi interrupt? no yes level 15 interrupt? note: i3 to i0 are interrupt mask bits in the status register (sr) of the cpu nmi? i3 to i0 level 14? no yes figure 6.3 interrupt sequence flowchart
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 104 of 502 rej09b0239-0400 6.6.2 stack after interru pt exception handling figure 6.4 shows the stack after interrupt exception handling. 32 bits 32 bits pc * 1 sr address 4n ? 8 4n ? 4 4n sp * 2 notes: 1. pc is the start address of the next instruction (instruction at the return address) after the executed instruction. 2. always make sure that sp is a multiple of 4 figure 6.4 stack after interrupt exception handling 6.7 interrupt response time table 6.3 lists the interrupt response time, which is the time from the occurrence of an interrupt request until the interrupt exception handling starts and fetching of the first instruction of the interrupt handling routine begins. figure 6.5 shows an example of the pipeline operation when an irq interrupt is accepted.
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 105 of 502 rej09b0239-0400 table 6.3 interrupt response time number of cycles item nmi, h-udi irq, peripheral modules remarks interrupt priority decision and comparison with mask bits in sr 1 icyc + 2 pcyc 1 icyc + 3 pcyc wait for completion of sequence currently being executed by cpu x ( 0) x ( 0) the longest sequence is for interrupt or address-error exception handling (x = 7 icyc + m1 + m2 + m3 + m4). if an interrupt-masking instruction follows, however, the time may be even longer. time from start of interrupt exception handling until fetch of first instruction of exception handling routine starts 8 icyc + m1 + m2 + m3 8 icyc + m1 + m2 + m3 performs the saving pc and sr, and vector address fetch. interrupt response time total: 9 icyc + 2 pcyc + m1 + m2 + m3 + x 9 icyc + 3 pcyc + m1 + m2 + m3 + x minimum * : 12 icyc + 2 pcyc 12 icyc + 3 pcyc sr, pc, and vector table are all in on-chip ram, or cache hit occurs (in write back mode). maximum: 16 icyc + 2 pcyc + 2 (m1 + m2 + m3) + m4 16 icyc + 3 pcyc + 2 (m1 + m2 + m3) + m4 notes: * in the case that m1 = m2 = m3 = m4 = 1 icyc. m1 to m4 are the number of cycles needed for the following memory accesses. m1: sr save (longword write) m2: pc save (longword write) m3: vector address read (longword read) m4: fetch first instruction of interrupt service routine
section 6 interrupt controller (intc) rev. 4.00 sep. 13, 2007 page 106 of 502 rej09b0239-0400
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 107 of 502 rej09b0239-0400 section 7 bus state controller (bsc) the bus state controller (bsc) outputs control si gnals for various types of memory that is connected to the external addre ss space and external devices. the bsc functions enable this lsi to connect directly with sram, sdram, and other memory storage devices, and external devices. 7.1 features the bsc has the following features. ? external address space ? a maximum 32 or 64 mbytes for each of the areas, cs0, cs3, cs4, cs5b, and cs6b, totally 256 mbytes (divided into five areas) ? a maximum 64 mbytes for each of the six areas, cs0, cs3, cs4, cs5, and cs6, totally 320 mbytes (divided into five areas) ? can specify the normal space interface, byte- selection sram, sdram, pcmcia for each address space ? can select the data bus width (8 or 16 bits) for each address space ? can control the insertion of wa it cycles for each address space ? can control the insertion of wait cycl es for each read access and write access ? can control the insertion of idle cycles in the consecutive access for five cases independently: read-write (in same sp ace/different space), read-read (in same space/different space), or the first cycle is a write access ? normal space interface ? supports the interface that can directly connect to the sram ? sdram interface ? can connect directly to sdram in area 3 ? multiplex output for row address/column address ? efficient access by single read/single write ? high-speed access by bank-active mode ? supports auto-refreshing and self-refreshing ? byte-selection sram interface ? can connect directly to byte-selection sram
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 108 of 502 rej09b0239-0400 ? pcmcia direct interface ? supports ic memory cards and i/o card inte rfaces defined in the jeida specifications ver 4.2 (pcmcia2.1 rev 2.1) ? controls the insertion of wait cycles by software ? supports the bus sizing function of the i/o bus width (only in little endian mode) ? refresh function ? supports the auto-refreshing and self-refreshing functions ? specifies the refresh interval by setting the refresh counter and clock selection ? can execute consecutive refresh cycles by specify ing the refresh counts (1, 2, 4, 6, or 8) the block diagram of the bsc is shown in figure 7.1.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 109 of 502 rej09b0239-0400 cmncr cs0wcr cs6bwcr cs0bcr cs6bbcr sdcr rtcsr rtcnt rtcor comparator bus mastership controller wait controller area controller internal master module internal slave module internal b us memory controller refresh controller module bus bsc cs0 , cs3 , cs4 , cs5b ( ce1a ), cs6b ( ce1b ) wait md5 iois16 a25 to a0, d15 to d0, bs , rd/ wr , rd , we1 ( be1 , dqmlu, we ), we0 ( be0 , dqmll), iciowr , iciord , ras , cas , cke, ce2a , ce2b [legend] cmncr: common control register csnwcr: csn space wait control register (n = 0, 3, 4, 5b, 6b) rwtcnt: reset wait counter csnbcr: csn space bus control register (n = 0, 3, 4, 5b, 6b) sdcr: sdram control register rtcsr: refresh timer control/status register rtcnt: refresh timer counter rtcor: refresh time constant register . . . . . . . . . . . . . . . rwtcnt figure 7.1 block diagram of bsc
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 110 of 502 rej09b0239-0400 7.2 input/output pins table 7.1 lists the pin configuration of the bsc. table 7.1 pin configuration abbreviation i/o function a25 to a0 output address bus * d15 to d0 i/o data bus bs output bus cycle start asserted when a normal space, burst rom (clock synchronous /asynchronous), or pcmcia is acce ssed. asserted at the same timing as cas assertion in sdram access. cs0 , cs3 , cs4 output chip select cs5b / ce1a output chip select chip enable for pcmcia allocated to area 5 when pcmcia is in use ce2a output chip enable for pcmcia alloca ted to area 5 when pcmcia is in use cs6b / ce1b output chip select chip enable for pcmcia allocated to area 6 when pcmcia is in use ce2b output chip enable for pcmcia alloca ted to area 6 when pcmcia is in use rd/ wr output read/write connects to we pins when sdram or byte-selection sram is used. rd output read pulse signal (read data output enable signal) strobe signal to indicate a memory read cycle when pcmcia is in use. we1(be1) / we output indicates that d15 to d8 are being written to. connected to the byte select signal when byte-selection sram is in use. strove signal to indicate a memory write cycle when pcmcia is in use. we0(be0) output indicates that d7 to d0 are being written to. connected to the byte select signal when a byte-selection sram is in use. ras output connected to ras pin when sdram is in use. cas output connected to cas pin when sdram is in use. cke output connected to cke pin when sdram is in use.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 111 of 502 rej09b0239-0400 abbreviation i/o function iois16 input pcmcia 16-bit i/o signal enabled only in little endian mode. drive this signal low in big endian mode. dqmlu, dqmll output connected to the dqm xx pin when sdram is in use. dqmlu: select signal for d15 to d8 dqmll: select signal for d7 to d0 wait input external wait input md5, md3 input md5: selects data alignment (big endian or little endian) md3: specifies area 0 bus width (8/16 bits) note: * as pins a25 to a16 act as general i/o ports immediately after a power-on reset, pull up or pull down these pins outside the lsi as needed. 7.3 area overview 7.3.1 area division the architecture of this lsi has 32-bit address space. the upper thr ee address bits divide the space into areas p0 to p4, and the c ache access methods can be specified for each area. for details, see section 3, cache. each area indicat ed by the remaining 29 bits is divided into ten areas (five areas are reserved) when address map 1 is selected or eight areas (three areas are reserved) when address map 2 is selected. the address ma p is selected by the map bit in cmncr. the bsc controls the areas indicated by the 29 bits. as listed in tables 7.2 and 7.3, memory can be connected directly to five physical areas of this lsi, and the chip select signals ( cs0 , cs3 , cs4 , cs5b , and cs6b ) are output for each area. cs0 is asserted during area 0 access. 7.3.2 shadow area areas 0, 3, 4, 5b, and 6b are divided by decoding physical address bits a28 to a25, which correspond to areas 000 to 111. address bits 31 to 29 are ignore d. this means that the range of area 0 addresses, for example, is h'00000000 to h'03f fffff, and its corresp onding shadow space is the address space in p1 to p3 areas obtained by adding to it h'20000000 n (n = 1 to 6). the address range for area 7 is h'1c000000 to h'1fffffff. the address space h'1c000000 + h'20000000 n to h'1fffffff + h'20000000 n (n = 0 to 6) corresponding to the area 7 shadow spaces are reserv ed, so do not use it.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 112 of 502 rej09b0239-0400 area p4 (h'e0000000 to h'efffffff) is an i/o area and is allocated to internal register addresses. therefore, area p4 does not become shadow space. area 0 (cs0) h'00000000 h'20000000 h'40000000 h'60000000 h'80000000 h'a0000000 h'c0000000 h'e0000000 area 1 (reserved) area 2 (reserved) area 3 (cs3) area 4 (cs4) area 5a (reserved) area 6a (reserved) area 7 (reserved) physical address space address space p0 p1 p2 p3 p4 area 5b (cs5b) area 6b (cs6b) figure 7.2 address space 7.3.3 address map the external address space has a ca pacity of 256 mbytes and is divided into five areas. types of memory to be connected and the data bus widt h are specified for indi vidual areas. the address map for the external address space is shown in table 7.2. table 7.2 address map 1 (cmncr.map = 0) physical address area memory to be connected capacity h'00000000 to h'03ffffff area 0 normal memory 64 mbytes h'04000000 to h'07ffffff area 1 reserved area * 64 mbytes h'08000000 to h'0bffffff area 2 reserved area * 64 mbytes h'0c000000 to h'0fffffff area 3 normal memory byte-selection sram sdram 64 mbytes
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 113 of 502 rej09b0239-0400 physical address area memory to be connected capacity h'10000000 to h'13ffffff area 4 normal memory byte-selection sram 64 mbytes h'14000000 to h'15ffffff area 5a reserved area * 32 mbytes h'16000000 to h'17ffffff area 5b normal memory byte-selection sram 32 mbytes h'18000000 to h'19ffffff area 6a reserved area * 32 mbytes h'1a000000 to h'1bffffff area 6b normal memory byte-selection sram 32 mbytes h'1c000000 to h'1fffffff area 7 reserved area * 64 mbytes note: * do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. table 7.3 address map 2 (cmncr.map = 1) physical address area memory to be connected capacity h'00000000 to h'03ffffff area 0 normal memory 64 mbytes h'04000000 to h'07ffffff area 1 reserved area * 1 64 mbytes h'08000000 to h'0bffffff area 2 reserved area * 1 64 mbytes h'0c000000 to h'0fffffff area 3 normal memory byte-selection sram sdram 64 mbytes h'10000000 to h'13ffffff area 4 normal memory byte-selection sram 64 mbytes h'14000000 to h'17ffffff area 5 * 2 normal memory byte-selection sram pcmcia 64 mbytes h'18000000 to h'1bffffff area 6 * 2 normal memory byte-selection sram pcmcia 64 mbytes h'1c000000 to h'1fffffff area 7 reserved area * 1 64 mbytes notes: 1. do not access the reserved area. if the reserved area is accessed, the correct operation cannot be guaranteed. 2. for area 5, cs5bbcr and cs5bwcr are enabled. for area 6, cs6bbcr and cs6bwcr are enabled.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 114 of 502 rej09b0239-0400 7.3.4 area 0 memory type and memory bus width the memory bus width in this lsi can be set for each area. in area 0, the bus width is selected from 8 bits and 16 bits at a power-on reset by the external pin setting. the bus width of other areas is set by the register. the corr espondence between the memory type , external pin (md3), and bus width is listed in table 7.4. table 7.4 correspondence betw een external pin (md3), memory type, and bus width for cs0 md3 memory type bus width 1 normal memory 8 bits 0 16 bits 7.3.5 data alignment this lsi supports the big endian and little endian methods of data alignment. the data alignment is specified using the external pin (md5) at a power-on reset as shown in table 7.5. table 7.5 correspondence between external pin (md5) and endians md5 endian 0 big endian 1 little endian
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 115 of 502 rej09b0239-0400 7.4 register descriptions the bsc has the following regist ers. for the addresses and access size for these registers, see section 18, list of registers. do not access spaces other than cs0 until se tting the memory interfaces is complete. ? common control register (cmncr) ? cs0 space bus control register for area 0 (cs0bcr) ? cs3 space bus control register for area 3 (cs3bcr) ? cs4 space bus control register for area 4 (cs4bcr) ? cs5b space bus control register for area 5b (cs5bbcr) ? cs6b space bus control register for area 6b (cs6bbcr) ? cs0 space wait control register for area 0 (cs0wcr) ? cs3 space wait control register for area 3 (cs3wcr) ? cs4 space wait control register for area 4 (cs4wcr) ? cs5b space wait control regist er for area 5b (cs5bwcr) ? cs6b space wait control regist er for area 6b (cs6bwcr) ? sdram control register (sdcr) ? refresh timer control/status register (rtcsr) ? refresh timer counter (rtcnt) ? refresh time constant register (rtcor)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 116 of 502 rej09b0239-0400 7.4.1 common control register (cmncr) cmncr is a 32-bit register that controls the co mmon items for each area . do not access external memory other than area 0 until setting cmncr is complete. bit bit name initial value r/w description 31 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 map 0 r/w space specification selects the address map for the external address space. the address maps to be selected are shown in tables 7.2 and 7.3. 0: selects address map 1 1: selects address map 2 11 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 ? 1 r reserved this bit is always read as 1. the write value should always be 1. 3 endian 0/1 * r endian flag fetches the external pin (md5) state for specifying endian at a power-on reset. the endian setting for all the address spaces are set by this bit. this is a read-only bit. 0: external pin (md5) for specifying endian was driven low at a power-on reset. this lsi is operated as big endian. 1: external pin (md5) for specifying endian was driven high at a power-on reset. this lsi is being operated as little endian. 2 ? 1 r reserved this bit is always read as 1. the write value should always be 1.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 117 of 502 rej09b0239-0400 bit bit name initial value r/w description 1 hizmem 0 r/w hi-z memory control specifies the pin state in st andby mode for pins a25 to a0, bs , csn , rd/ wr , wen ( ben )/dqmxx, and rd . 0: high impedance in standby mode 1: driven in standby mode 0 hizcnt 0 r/w hi-z control specifies the pin state in standby mode for the ckio, cke, ras , and cas pins. 0: high impedance in standby mode 1: driven in standby mode note: * the external pin (md5) state for specifyi ng endian is sampled at a power-on reset. when big endian is specified, this bit is r ead as 0 and when little endian is specified, this bit is read as 1. 7.4.2 csn space bus control register (csnbcr) (n = 0, 3, 4, 5b, 6b) csnbcr specifies the type of me mory connected to each space, da ta-bus width of each space, and the number of wait cycles between access cycles. do not access external memory other than area 0 until setting csnbcr is completed. bit bit name initial value r/w description 31, 30 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 29 28 iww1 iww0 1 1 r/w r/w idle cycles between write-read cycles and write-write cycles specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. the write and read cycles or write and write cycles performed consecutively are the target cycle. 000: no idle cycle inserted 001: 1 idle cycle inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 118 of 502 rej09b0239-0400 bit bit name initial value r/w description 27 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 26 25 iwrwd1 iwrwd0 1 1 r/w r/w idle cycles for another space read-write specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. the read and write cycles which are performed consecutively and are accessed to different areas are the target cycle. 000: no idle cycle inserted 001: 1 idle cycles inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted 24 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 23 22 iwrws1 iwrws0 1 1 r/w r/w idle cycles for read-write in same space specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. the read and write cycles which are performed consecutively and are accessed to the same area are the target cycle. 000: no idle cycle inserted 001: 1 idle cycles inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted 21 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 119 of 502 rej09b0239-0400 bit bit name initial value r/w description 20 19 iwrrd1 iwrrd0 1 1 r/w r/w idle cycles for read-read in another space specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. the read and read cycles which are performed consecutively and are accessed to different areas are the target cycle. 000: no idle cycle inserted 001: 1 idle cycles inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted 18 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 17 16 iwrrs1 iwrrs0 1 1 r/w r/w idle cycles for read-read in same space specify the number of idle cycles to be inserted after the access to a memory that is connected to the area. the read and read cycles which are performed consecutively and are accessed to the same area are the target cycle. 000: no idle cycle inserted 001: 1 idle cycles inserted 010: 2 idle cycles inserted 011: 4 idle cycles inserted
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 120 of 502 rej09b0239-0400 bit bit name initial value r/w description 15 14 13 12 type3 type2 type1 type0 0 0 0 0 r/w r/w r/w r/w memory type specify the type of memory connected to the area. 0000: normal space 0001: reserved (setting prohibited) 0010: reserved (setting prohibited) 0011: byte-selection sram 0100: sdram 0101: pcmcia 0110: reserved (setting prohibited) 0111: reserved (setting prohibited) 1000: reserved (setting prohibited) 1001: reserved (setting prohibited) 1010: reserved (setting prohibited) 1011: reserved (setting prohibited) 1100: reserved (setting prohibited) 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) for details on memory type in each area, see tables 7.2 and 7.3. 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 121 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 9 bsz1 bsz0 1 * 1 * r/w r/w data bus size specify the data bus width of each area. 00: reserved (setting prohibited) 01: 8 bits 10: 16 bits 11: reserved (setting prohibited) notes: 1. the data bus width for area 0 is specified by the external pin. these bits are ignored. 2. when area 5 or 6 is specified as pcmcia space, the bus width can be specified as either 8 bits or 16 bits. 3. if area 3 is specified as sdram space, the bus width must be specified as 16 bits. 4. these bits must be specified to either 01 or 11 before accessing to memory in other than area 0. 8 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. note: * cs0bcr fetches the external pin state (md3) that specify the bus width at a power-on reset.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 122 of 502 rej09b0239-0400 7.4.3 csn space wait control register (csnwcr) (n = 0, 3, 4, 5b, 6b) csnwcr specifies various wait cycles for memory accesses. the bit c onfiguration of this register varies as shown below according to the memory type (type3, type2, type1, or type0) specified by the csn space bus control register (csnbcr). specify csnwcr before accessing the target area. specify csnbcr first, then specify csnwcr. normal space, byte-selection sram: ? cs0wcr bit bit name initial value r/w description 31 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 11 sw1 sw0 0 0 r/w r/w number of delay cycles from address, csn assertion to rd , wen ( ben ) assertion specify the number of delay cycles from address and csn assertion to rd and wen ( ben ) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 123 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 9 8 7 wr3 wr2 wr1 wr0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cy cles that are necessary for read or write access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycle is 0. 0: external wait is valid 1: external wait is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 hw1 hw0 0 0 r/w r/w number of delay cycles from rd, wen ( ben ) negation to address, csn negation specify the number of delay cycles from rd and wen ( ben ) negation to address and csn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 124 of 502 rej09b0239-0400 ? cs3wcr bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 20 bas 0 r/w byte access select ion for byte-selection sram specifies the wen ( ben ) and rd/ wr signal timing when the byte-selection sram interface is used. 0: asserts the wen ( ben ) signal at the read/write timing (signal used as strobe) and asserts the rd/ wr signal during the write access cycle (signal used as status) 1: asserts the wen ( ben ) signal during the read/write access cycle (used as status) and asserts the rd/ wr signal at the write timing (used as strobe) 19 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 7 wr3 wr2 wr1 wr0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cy cles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 125 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 wm 0 r/w external wait mask specification specify whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycle is 0. 0: external wait is valid 1: external wait is ignored 5 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. ? cs4wcr bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 20 bas 0 r/w byte access select ion for byte-selection sram specifies the wen ( ben ) and rd/ wr signal timing when the byte-selection sram interface is used. 0: asserts the wen ( ben ) signal at the read/write timing (signal used as strobe) and asserts the rd/ wr signal during the write access cycle (signal used as status) 1: asserts the wen ( ben ) signal during the read/write access cycle (signal used as status) and asserts the rd/ wr signal at the write timing (signal used as strobe) 19 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 126 of 502 rej09b0239-0400 bit bit name initial value r/w description 18 17 16 ww2 ww1 ww0 0 0 0 r/w r/w r/w number of write access wait cycles specify the number of cycles that are necessary for write access. 000: same number of cycles as wr3 to wr0 setting (read access wait) 001: 0 cycle 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 11 sw1 sw0 0 0 r/w r/w number of delay cycles from address, csn assertion to rd , wen ( ben ) assertion specify the number of delay cycles from address and csn assertion to rd and wen ( ben ) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 127 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 9 8 7 wr3 wr2 wr1 wr0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cy cles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycles is 0. 0: external wait is valid 1: external wait is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 hw1 hw0 0 0 r/w r/w number of delay cycles from rd , wen ( ben ) negation to address, csn negation specify the number of delay cycles from rd and wen ( ben ) negation to address and csn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 128 of 502 rej09b0239-0400 ? cs5bwcr bit bit name initial value r/w description 31 to 19 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 18 17 16 ww2 ww1 ww0 0 0 0 r/w r/w r/w number of write access wait cycles specify the number of cycles that are necessary for write access. 000: same number of cycles as wr3 to wr0 setting (read access wait) 001: 0 cycle 010: 1 cycle 011: 2 cycles 100: 3 cycles 101: 4 cycles 110: 5 cycles 111: 6 cycles 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 11 sw1 sw0 0 0 r/w r/w number of delay cycles from address, csn assertion to rd , wen ( ben ) assertion specify the number of delay cycles from address and csn assertion to rd and wen ( ben ) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 129 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 9 8 7 wr3 wr2 wr1 wr0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cy cles that are necessary for read access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specify whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycle is 0. 0: external wait is valid 1: external wait is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 hw1 hw0 0 0 r/w r/w number of delay cycles from rd , wen ( ben ) negation to address, csn negation specify the number of delay cycles from rd and wen ( ben ) negation to address and csn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 130 of 502 rej09b0239-0400 ? cs6bwcr bit bit name initial value r/w description 31 to 21 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 20 bas 0 r/w byte access select ion for byte-selection sram specifies the wen ( ben ) and rd/ wr signal timing when the byte-selection sram interface is used. 0: asserts the wen ( ben ) signal at the read/write timing (signal used as strobe) and asserts the rd/ wr signal during the write access cycle (signal used as status) 1: asserts the wen ( ben ) signal during the read/write access cycle (used as status) and asserts the rd/ wr signal at the write timing (used as strobe) 19 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 11 sw1 sw0 0 0 r/w r/w number of delay cycles from address, csn assertion to rd , wen ( ben ) assertion specify the number of delay cycles from address and csn assertion to rd and wen ( ben ) assertion. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 131 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 9 8 7 wr3 wr2 wr1 wr0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cy cles that are necessary for read or write access. 0000: 0 cycle 0001: 1 cycle 0010: 2 cycles 0011: 3 cycles 0100: 4 cycles 0101: 5 cycles 0110: 6 cycles 0111: 8 cycles 1000: 10 cycles 1001: 12 cycles 1010: 14 cycles 1011: 18 cycles 1100: 24 cycles 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 6 wm 0 r/w external wait mask specification specifies whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycle is 0. 0: external wait is valid 1: external wait is ignored 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 hw1 hw0 0 0 r/w r/w number of delay cycles from rd, wen ( ben ) negation to address, csn negation specify the number of delay cycles from rd and wen ( ben ) negation to address and csn negation. 00: 0.5 cycles 01: 1.5 cycles 10: 2.5 cycles 11: 3.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 132 of 502 rej09b0239-0400 sdram*: ? cs3wcr bit bit name initial value r/w description 31 to 15 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 14 13 wtrp1 wtrp0 0 0 r/w r/w wait cycle number for precharge completion specify the number of minimu m wait cycles inserted to wait for the completion of precharge in the following cases. ? from the start of auto-prec harge to the issuing of the actv command for the same bank. ? from the issuing of the pre/pall command to the issuing of the actv command for the same bank. ? from the issuing of the pall command during auto- refreshing to the issuing of the ref command. ? from the issuing of the pall command during self- refreshing to the issuing of the self command. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles 12 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 11 10 wtrcd1 wtrcd0 0 1 r/w r/w wait cycle number from actv command to read(a)/writ(a) command specify the number of minimu m wait cycles from issuing the actv command to issuing the read(a)/writ(a) command. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 133 of 502 rej09b0239-0400 bit bit name initial value r/w description 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 7 a3cl1 a3cl0 1 0 r/w r/w cas latency for area 3. specify the cas latency for area 3. 00: 1 cycle 01: 2 cycles 10: 3 cycles 11: reserved (setting prohibited) 6, 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 3 trwl1 trwl0 0 0 r/w r/w wait cycle number for precharge start wait specify the number of minimu m wait cycles inserted to wait for the start of prechar ge in the following cases. ? from the issuing of the writa command by this lsi to the start of the auto- precharge in the sdram. the actv command for the same bank is issued after issuing the writa command in non-bank active mode. to confirm how many cycles should be needed in the sdram between receiving the writa command and the auto-precharge start, re fer to the data sheets for each sdram. set this bit so that the cycle number in that data sheets should not exceed the cycle number set by this bit. ? from the issuing of the writ command by this lsi to the issuing of the pre command. a different row address in the same bank is accessed in bank active mode. 00: 0 cycle (no wait cycle) 01: 1 cycle 10: 2 cycles 11: 3 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 134 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1 0 wtrc1 wtrc0 0 0 r/w r/w idle cycle number from ref command/self-refreshing release to actv/ref/mrs command specify the number of mi nimum idle cycles in the following cases. ? from the issuing of the ref command to the issuing of the actv/ref/mrs command. ? from the self-refreshing rele ase to the issuing of the actv/ref/mrs command. 00: 2 cycles 01: 3 cycles 10: 5 cycles 11: 8 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 135 of 502 rej09b0239-0400 pcmcia: ? cs5bwcr, cs6bwcr bit bit name initial value r/w description 31 to 22 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 21 20 sa1 sa0 0 0 r/w r/w space attribute specification specify memory card interfac e or i/o card interface when the pcmcia interface is selected. ? sa1 0: specifies memory card interface when a25 = 1 1: specifies i/o card interface when a25 = 1 ? sa0 0: specifies memory card interface when a25 = 0 1: specifies i/o card interface when a25 = 0 19 to 15 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 136 of 502 rej09b0239-0400 bit bit name initial value r/w description 14 13 12 11 ted3 ted2 ted1 ted0 0 0 0 0 r/w r/w r/w r/w delay from address to rd or we assert specify the delay time from address output to rd or we assertion in pcmcia interface. 0000: 0.5 cycles 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: reserved (setting prohibited) 1001: reserved (setting prohibited) 1010: reserved (setting prohibited) 1011: reserved (setting prohibited) 1100: reserved (setting prohibited) 1101: reserved (setting prohibited) 1110: reserved (setting prohibited) 1111: reserved (setting prohibited) 10 9 8 7 pcw3 pcw2 pcw1 pcw0 1 0 1 0 r/w r/w r/w r/w number of access wait cycles specify the number of wait cycles to be inserted. 0000: 3 cycles 0001: 6 cycles 0010: 9 cycles 0011: 12 cycles 0100: 15 cycles 0101: 18 cycles 0110: 22 cycles 0111: 26 cycles 1000: 30 cycles 1001: 33 cycles 1010: 36 cycles 1011: 38 cycles 1100: 52 cycles 1101: 60 cycles 1110: 64 cycles 1111: 80 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 137 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 wm 0 r/w external wait mask specification specify whether or not the external wait input is valid. the specification by this bit is valid even when the number of access wait cycle is 0. 0: external wait is valid 1: external wait is ignored 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 2 1 0 teh3 teh2 teh1 teh0 0 0 0 0 r/w r/w r/w r/w delay from rd or we negate to address specify the address hold time from rd or we negation in the pcmcia interface. 0000: 0.5 cycle 0001: 1.5 cycles 0010: 2.5 cycles 0011: 3.5 cycles 0100: 4.5 cycles 0101: 5.5 cycles 0110: 6.5 cycles 0111: 7.5 cycles 1000: 8.5 cycles 1001: 9.5 cycles 1010: 10.5 cycles 1011: 11.5 cycles 1100: 12.5 cycles 1101: 13.5 cycles 1110: 14.5 cycles 1111: 15.5 cycles
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 138 of 502 rej09b0239-0400 7.4.4 sdram control register (sdcr) sdcr specifies the method to refresh and acce ss sdram, and the types of sdrams to be connected. bit bit name initial value r/w description 31 to 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 11 rfsh 0 r/w refresh control specifies whether or not the refreshing sdram is performed. 0: refreshing is not performed 1: refreshing is performed 10 rmode 0 r/w refresh control specifies whether to perform auto-refreshing or self- refreshing when the rfsh bit is 1. when the rfsh bit is 1 and this bit is 1, self-refreshing starts immediately. when the rfsh bit is 1 and this bit is 0, auto-refreshing starts according to the conten ts that are set in rtcsr, rtcnt, and rtcor. 0: auto-refreshing is performed 1: self-refreshing is performed 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 bactv 0 r/w bank active mode specifies whether to access in auto-precharge mode (using reada and writa commands) or in bank active mode (using read and writ commands). 0: auto-precharge mode (using reada and writa commands) 1: bank active mode (using read and writ commands) 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 139 of 502 rej09b0239-0400 bit bit name initial value r/w description 4 3 a3row1 a3row0 0 0 r/w r/w number of bits of row address for area 3 specify the number of bits of the row address for area 3. 00: 11 bits 01: 12 bits 10: 13 bits 11: reserved (setting prohibited) 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1 0 a3col1 a3col0 0 0 r/w r/w number of bits of column address for area 3 specify the number of bits of the column address for area 3. 00: 8 bits 01: 9 bits 10: 10 bits 11: reserved (setting prohibited) 7.4.5 refresh timer contro l/status register (rtcsr) rtcsr specifies various items about refresh for sdram. when rtcsr is written to, the upper 16 bits of the write data must be h'a55a to cancel write protection. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 140 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 cmf 0 r/w compare match flag indicates that a compare match occurs between the refresh timer counter (rtcnt) and refresh time constant register (rtcor). [clearing condition] when 0 is written to this bit after reading rtcsr with cmf = 1. [setting condition] when rtcnt value matches rtcor value 6 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 5 4 3 cks2 cks1 cks0 0 0 0 r/w r/w r/w clock select select the clock input to count-up the refresh timer counter (rtcnt). 000: stop the counting-up 001: b /4 010: b /16 011: b /64 100: b /256 101: b /1024 110: b /2048 111: b /4096
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 141 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 1 0 rrc2 rrc1 rrc0 0 0 0 r/w r/w r/w refresh count specify the number of consec utive refresh cycles, when the refresh request occurs after the coincidence of the values of the refresh ti mer counter (rtcnt) and the refresh time constant register (rtcor). using consecutive refresh cycles can prolong cycles between refreshing. 000: once 001: twice 010: 4 times 011: 6 times 100: 8 times 101: reserved (setting prohibited) 110: reserved (setting prohibited) 111: reserved (setting prohibited) 7.4.6 refresh time r counter (rtcnt) rtcnt is an 8-bit counter that increments using the clock selected by bi ts cks2 to cks0 in rtcsr. when rtcnt matches rtcor, rtcnt is cleared to 0. the value in rtcnt returns to 0 after counting up to 255. when rtcnt is writte n to, the upper 16 bits of the write data must be h'a55a to cancel write protection. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 to 0 ? all 0 r/w 8-bit counter
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 142 of 502 rej09b0239-0400 7.4.7 refresh time constant register (rtcor) rtcor is an 8-bit register. when rtcor matche s rtcnt, the cmf bit in rtcsr is set to 1 and rtcnt is cleared to 0. when the rfsh bit in sdcr is 1, a memory refresh request is issued. the request is maintained until the refresh operatio n is performed. if the request is not processed when the next matching occurs, the previous request is ignored. when the rtcor is written to, the upper 16 bits of the write data must be h'a55a to cancel write protection. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 to 0 ? all 0 r/w 8-bit counter
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 143 of 502 rej09b0239-0400 7.5 operation 7.5.1 endian/access size and data alignment this lsi supports big endian, in which the most significant byte (msbyte) of multiple byte data is stored in the lower address, and little endian, in which the least significant byte (lsbyte) of multiple byte data is stored in the lower address. endian is specified at a power-on reset by the external pin (md5). when pin md5 is driven low at a power-on reset, the endian will become big endian and when pin md5 is driven high at a power-on reset, the endian will become little endian. two data bus widths (8 bits and 16 bits) are available for normal memory and byte-selection sram. only 16-bit data bus width is available for sdram. two data bus widths (8 bits and 16 bits) are available for pcmcia interface. data ali gnment is performed in accordance with the data bus width of the device and endian. this also means that when longword data is read from a byte- width device, the read operation must be done four times. in this lsi, data alignment and conversion of data length is performed au tomatically between th e respective interfaces. tables 7.6 to 7.9 show the re lationship between e ndian, device data width, and access unit.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 144 of 502 rej09b0239-0400 table 7.6 16-bit external device/bi g endian access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d 15 to d8 d7 to d0 we3(be3) , dqmuu we2(be2) , dqmul we1(be1) , dqmlu we0(be0) , dqmll byte access at 0 ? ? data 7 to 0 ? ? ? assert ? byte access at 1 ? ? ? data 7 to 0 ? ? ? assert byte access at 2 ? ? data 7 to 0 ? ? ? assert ? byte access at 3 ? ? ? data 7 to 0 ? ? ? assert word access at 0 ? ? data 15 to 8 data 7 to 0 ? ? assert assert word access at 2 ? ? data 15 to 8 data 15 to 8 ? ? assert assert longword access at 0 1st time at 0 ? ? data 31 to 24 data 23 to 16 ? ? assert assert 2nd time at 2 ? ? data 15 to 8 data 7 to 0 ? ? assert assert
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 145 of 502 rej09b0239-0400 table 7.7 8-bit external device/big endian access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d 15 to d8 d7 to d0 we3(be3) , dqmuu we2(be2) , dqmul we1(be1) , dqmlu we0(be0) , dqmll byte access at 0 ? ? ? data 7 to 0 ? ? ? assert byte access at 1 ? ? ? data 7 to 0 ? ? ? assert byte access at 2 ? ? ? data 7 to 0 ? ? ? assert byte access at 3 ? ? ? data 7 to 0 ? ? ? assert 1st time at 0 ? ? ? data 15 to 8 ? ? ? assert word access at 0 2nd time at 1 ? ? ? data 7 to 0 ? ? ? assert 1st time at 2 ? ? ? data 15 to 8 ? ? ? assert word access at 2 2nd time at 3 ? ? ? data 7 to 0 ? ? ? assert 1st time at 0 ? ? ? data 31 to 24 ? ? ? assert 2nd time at 1 ? ? ? data 23 to 16 ? ? ? assert 3rd time at 2 ? ? ? data 15 to 8 ? ? ? assert longword access at 0 4th time at 3 ? ? ? data 7 to 0 ? ? ? assert
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 146 of 502 rej09b0239-0400 table 7.8 16-bit external device/littl e endian access and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d 15 to d8 d7 to d0 we3(be3) , dqmuu we2(be2) , dqmul we1(be1) , dqmlu we0(be0) , dqmll byte access at 0 ? ? ? data 7 to 0 ? ? ? assert byte access at 1 ? ? data 7 to 0 ? ? ? assert ? byte access at 2 ? ? ? data 7 to 0 ? ? ? assert byte access at 3 ? ? data 7 to 0 ? ? ? assert ? word access at 0 ? ? data 15 to 8 data 7 to 0 ? ? assert assert word access at 2 ? ? data 15 to 8 data 7 to 0 ? ? assert assert longword access at 0 1st time at 0 ? ? data 15 to 8 data 7 to 0 ? ? assert assert 2nd time at 2 ? ? data 31 to 24 data 23 to 16 ? ? assert assert
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 147 of 502 rej09b0239-0400 table 7.9 8-bit external device/little endian a ccess and data alignment data bus strobe signals operation d31 to d24 d23 to d16 d 15 to d8 d7 to d0 we3(be3) , dqmuu we2(be2) , dqmul we1(be1) , dqmlu we0(be0) , dqmll byte access at 0 ? ? ? data 7 to 0 ? ? ? assert byte access at 1 ? ? ? data 7 to 0 ? ? ? assert byte access at 2 ? ? ? data 7 to 0 ? ? ? assert byte access at 3 ? ? ? data 7 to 0 ? ? ? assert 1st time at 0 ? ? ? data 7 to 0 ? ? ? assert word access at 0 2nd time at 1 ? ? ? data 15 to 8 ? ? ? assert 1st time at 2 ? ? ? data 7 to 0 ? ? ? assert word access at 2 2nd time at 3 ? ? ? data 15 to 8 ? ? ? assert 1st time at 0 ? ? ? data 7 to 0 ? ? ? assert 2nd time at 1 ? ? ? data 15 to 8 ? ? ? assert 3rd time at 2 ? ? ? data 23 to 16 ? ? ? assert longword access at 0 4th time at 3 ? ? ? data 31 to 24 ? ? ? assert
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 148 of 502 rej09b0239-0400 7.5.2 normal space interface basic timing: for access to a normal space, this lsi uses strobe signal output in consideration of the fact that mainly static ram will be directly connected. when using sram with a byte- selection pin, see section 7.5. 6, byte-selection sram interf ace. figure 7.3 shows the basic timings of normal space access. a no-wait norm al access is completed in two cycles. the bs signal is asserted for one cycle to indicate the start of a bus cycle. ckio a rd/ wr rd/ wr d csn t1 t2 rd wen ( ben ) bs d read write figure 7.3 normal space basic access timing (no-wait access) there is no output signal wh ich informs external devices of the access size when reading. although the least significant bit of the address indicates the correct address when the access starts, 16-bit data is always read from a 16-bit device. when writing, only the wen ( ben ) signal for the byte to be written to is asserted.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 149 of 502 rej09b0239-0400 when buffers ar e placed on the data bus, the rd signal should be used to control the buffers. the rd/ wr signal indicates the same state as a read cycle (driven high) when no access has been carried out. therefore, care must be taken when controlling the buffers with the rd/ wr signal, to avoid data conflict. figures 7.4 and 7.5 show the basic timings of normal sp ace consecutive access. if the wm bit in csnwcr is cleared to 0, a tnop cycle is inserted to check the external wait (figure 7.4). if the wm bit in csnwcr is set to 1, an external wait request is ignored and no tnop cycle is inserted (figure 7.5). ckio a25 to a0 rd rd/ wr d15 to d0 wen ( ben ) d15 to d0 bs wait csn t1 t2 tnop t1 t2 read write figure 7.4 consecutive access to norm al space (1): bus width = 16 bits, longword access, csnwcr.wm = 0 (a ccess wait = 0, cycle wait = 0)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 150 of 502 rej09b0239-0400 t1 t2 t1 t2 ckio a25 to a0 rd/ wr d15 to d0 csn rd wen ( ben ) bs wait d15 to d0 read write figure 7.5 consecutive access to norm al space (2): bus width = 16 bits, longword access, csnwcr.wm = 1 (a ccess wait = 0, cycle wait = 0)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 151 of 502 rej09b0239-0400 a16 a0 cs oe i/o7 i/o0 we      a17 a1 csn rd d15 d8 we1 ( be1 ) d7 d0 we0 ( be0 ) this lsi 128 kwords 8 bits sram  a16 a0 cs oe i/o7 i/o0 we         figure 7.6 example of 16-bit data-width sram connection this lsi 128 kwords x 8 bits sram a16 a0 cs oe i/o7 i/o0 we . . . a16 a0 csn rd d7 d0 we0 ( be0 ) . . . . . . . . . . . . . . . figure 7.7 example of 8-bit data-width sram connection
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 152 of 502 rej09b0239-0400 7.5.3 access wait control wait cycle insertion on a normal space access can be controlled by the settings of bits wr3 to wr0 in csnwcr. it is possible for areas 4, 5a, and 5b to insert wait cycles independently in read access and in write access. the areas other than 4, 5a, and 5b have the same access wait for read cycle and write cycle. the specified number of tw cycles is inserted as wait cycles in a normal space access shown in figure 7.9. t1 ckio a25 to a0 csn rd/ wr rd d15 to d0 d15 to d0 wen ( ben ) bs tw read write t2 figure 7.8 wait timing for normal space access (software wait only) when the wm bit in csnwcr is cleared to 0, the external wait signal ( wait ) is also sampled. the wait pin sampling is shown in figure 7.9. in this example, two wait cycles are inserted as software wait. the wait signal is sampled at the falling e dge of the ckio signal in the cycle immediately before the t2 cycle (t1 or tw cycle).
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 153 of 502 rej09b0239-0400 t1 ckio a25 to a0 csn rd/ wr rd d15 to d0 wen ( ben ) d15 to d0 wait tw tw twx t2 read write bs wait cycles inserted by wait signal figure 7.9 wait cycle timing for normal space access (wait cycle insertion using wait ) 7.5.4 extension of chip select ( csn ) assertion period the number of cycles from csn assertion to rd and wen ( ben ) assertion can be specified by setting bits sw1 and sw0 in csnwcr. the number of cycles from rd and wen ( ben ) negation to csn negation can be specified by setting bits hw1 and hw0. therefore, a flexible interface to an external device can be obtained. figure 7.10 sh ows an example. a th cycle and a tf cycle are added before and after a normal cycl e, respectively. in these cycles, rd and wen ( ben ) are not asserted, while other signals are asserted. the data output is prolonged to the tf cycle, and this prolongation is useful for devices with slow writing operations.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 154 of 502 rej09b0239-0400 t1 ckio a25 to a0 csn rd/ wr rd d15 to d0 d15 to d0 wen ( ben ) bs th read write t2 tf figure 7.10 example of timing when csn assertion period is extended
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 155 of 502 rej09b0239-0400 7.5.5 sdram interface sdram direct connection: the sdram that can be connected to this lsi is a product that has 11/12/13 bits of row address, 8/9/10 bits of column address, 4 or less banks, and uses the a10 pin for setting precharge mode in read and write command cycles. the control signals for dir ect connection of sdram are ras , cas , rd/ wr , dqmlu, dqmll, cke, and cs3 . signals other than cke are valid when cs3 is asserted. sdram can be connected to area 2. the data bus width of the area that is connected to sdram can be set to 16 bits. burst read/single write (burst length 1) and burst read/burst write (burst length 1) are supported as the sdram operating mode. commands for sdram can be specified by ras , cas , rd/ wr , and specific address signals. these commands are shown below. ? nop ? auto-refreshing (ref) ? self-refreshing (self) ? all banks precharge (pall) ? specified bank precharge (pre) ? bank active (actv) ? read (read) ? read with precharge (reada) ? write (writ) ? write with precharge (writa) ? write mode register (mrs) the byte to be accessed is specified by dqml u and dqmll. reading or writing is performed for a byte whose corresponding dqmxx is low. for details on the relationship between dqmxx and the byte to be accessed, refer to section 7.5.1, endian/access size and data alignment. figures 7.11 shows an example of the connection of the sdram with the lsi.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 156 of 502 rej09b0239-0400 a14 a1 cke ckio csn ras cas rd/ wr d15 d0 dqmlu dqmll 64-mbit sdram (1 mword x 16 bits x 4 banks) . . . a13 a0 cke clk cs ras cas we i/o15 i/o0 dqmu dqml . . . . . . . . . this lsi figure 7.11 example of 16-bit data-width sdram connection address multiplexing: an address multiplexing is specified so that sdram can be connected without external multiplexing circuitry according to the setting of bits bsz1 and bsz0 in csnbcr, anrow1 and anrow0 and ancol1 ancol0 in sdcr. tables 7.10 to 7.15 show the relationship between those settings and the bits output on the address pins. do not specify those bits in the manner other than this table, otherwise the operation of this lsi is not guaranteed. a25 to a18 are not multiplexed and the original valu es of address are always output on these pins. pin a0 of sdram specifies a word address. therefore, connect this a0 pin of sdram to pin a1 of this lsi; pin a1 pin of sdram to pin a2 of this lsi, and so on.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 157 of 502 rej09b0239-0400 table 7.10 relationship between register settings and address multiplex output (1) conditions: one 16-mbit product (512 kwords x 16 bits x 2 banks, 8-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 00 (11-bit row address), and a3col[1:0] = 00 (8-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a25 a17 unused a16 a24 a16 a15 a23 a15 a14 a22 a14 a13 a21 a21 a12 a20 * 2 a20 * 2 a11 (ba0) specifies bank a11 a19 l/h * 1 a10/ap specifies address/precharge a10 a18 a10 a9 address a9 a17 a9 a8 a8 a16 a8 a7 a7 a15 a7 a6 a6 a14 a6 a5 a5 a13 a5 a4 a4 a12 a4 a3 a3 a11 a3 a2 a2 a10 a2 a1 a1 a9 a1 a0 a0 a8 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 158 of 502 rej09b0239-0400 table 7.11 relationship between register settings and address multiplex output (2) conditions: one 64-mbit product (1 mword x 16 bits x 4 banks, 8-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 01 (12-bit row address), and a3col[1:0] = 00 (8-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a25 a17 unused a16 a24 a16 a15 a23 a15 a14 a22 * 2 a22 * 2 a13 (ba1) specifies bank a13 a21 * 2 a21 * 2 a12 (ba0) a12 a20 a12 a11 address a11 a19 l/h * 1 a10/ap specifies address/precharge a10 a18 a10 a9 address a9 a17 a9 a8 a8 a16 a8 a7 a7 a15 a7 a6 a6 a14 a6 a5 a5 a13 a5 a4 a4 a12 a4 a3 a3 a11 a3 a2 a2 a10 a2 a1 a1 a9 a1 a0 a0 a8 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 159 of 502 rej09b0239-0400 table 7.12 relationship between register settings and address multiplex output (3) conditions: one 128-mbit product (2 mwords x 16 bits x 4 banks, 9-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 01 (12-bit row address), and a3col[1:0] = 01 (9-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a26 a17 unused a16 a25 a16 a15 a24 a15 a14 a23 * 2 a23 * 2 a13 (ba1) specifies bank a13 a22 * 2 a22 * 2 a12 (ba0) a12 a21 a12 a11 address a11 a20 l/h * 1 a10/ap specifies address/precharge a10 a19 a10 a9 address a9 a18 a9 a8 a8 a17 a8 a7 a7 a16 a7 a6 a6 a15 a6 a5 a5 a14 a5 a4 a4 a13 a4 a3 a3 a12 a3 a2 a2 a11 a2 a1 a1 a10 a1 a0 a0 a9 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 160 of 502 rej09b0239-0400 table 7.13 relationship between register settings and address multiplex output (4) conditions: one 256-mbit product (4 mwords x 16 bits x 4 banks, 10-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 01 (12-bit row address), and a3col[1:0] = 10 (10-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a27 a17 unused a16 a26 a16 a15 a25 a15 a14 a24 * 2 a24 * 2 a13 (ba1) specifies bank a13 a23 * 2 a23 * 2 a12 (ba0) a12 a22 a12 a11 address a11 a21 l/h * 1 a10/ap specifies address/precharge a10 a20 a10 a9 address a9 a19 a9 a8 a8 a18 a8 a7 a7 a17 a7 a6 a6 a16 a6 a5 a5 a15 a5 a4 a4 a14 a4 a3 a3 a13 a3 a2 a2 a12 a2 a1 a1 a11 a1 a0 a0 a10 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 161 of 502 rej09b0239-0400 table 7.14 relationship between register settings and address multiplex output (5) conditions: one 256-mbit product (4 mwords x 16 bits x 4 banks, 9-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 10 (13-bit row address), and a3col[1:0] = 01 (9-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a26 a17 unused a16 a25 a16 a15 a24 * 2 a24 * 2 a14 (ba1) specifies bank a14 a23 * 2 a23 * 2 a13 (ba0) a13 a22 a13 a12 address a12 a21 a12 a11 a11 a20 l/h * 1 a10/ap specifies address/precharge a10 a19 a10 a9 address a9 a18 a9 a8 a8 a17 a8 a7 a7 a16 a7 a6 a6 a15 a6 a5 a5 a14 a5 a4 a4 a13 a4 a3 a3 a12 a3 a2 a2 a11 a2 a1 a1 a10 a1 a0 a0 a9 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 162 of 502 rej09b0239-0400 table 7.15 relationship between register settings and address multiplex output (6) conditions: one 512-mbit product (8 mwords x 16 bits x 4 banks, 10-bit column product) is connected with a3bsz[1:0] = 10 (16-bit data bus width), a3row[1:0] = 10 (13-bit row address), and a3col[1:0] = 10 (10-bit column address). pins of this lsi output row address output column address pins of sdram function a17 a27 a17 unused a16 a26 a16 a15 a25 * 2 a25 * 2 a14 (ba1) specifies bank a14 a24 * 2 a24 * 2 a13 (ba0) a13 a23 a13 a12 address a12 a22 a12 a11 a11 a21 l/h * 1 a10/ap specifies address/precharge a10 a20 a10 a9 address a9 a19 a9 a8 a8 a18 a8 a7 a7 a17 a7 a6 a6 a16 a6 a5 a5 a15 a5 a4 a4 a14 a4 a3 a3 a13 a3 a2 a2 a12 a2 a1 a1 a11 a1 a0 a0 a10 a0 unused notes: 1. l/h is a bit used in the command specific ation; it is fixed low or high according to the access mode. 2. bank address specification
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 163 of 502 rej09b0239-0400 burst read: a burst read occurs in the fo llowing cases with this lsi. 1. access size in reading is larger than data bus width. 2. 16-byte transf er in cache miss. this lsi always accesses the sdram with burst length 1. for example, read access of burst length 1 is performed consecutively eight times to read 16-byte consecutive data from the sdram that is connected to a 16-bit data bus. table 7.16 shows the relationship between the access size and the number of bursts. table 7.16 relationship between access size and number of bursts bus width access size number of bursts 16 bits 8 bits 1 16 bits 1 32 bits 2 16 bytes 8 figures 7.12 and 7.13 show timing charts in burst read. in burst read, the actv command is output in the tr cycle, the read command is issued in the tc1, tc2, and tc3 cycles, the reada command is issued in the tc4 cycle, and the read data is latched at the rising edge of the external clock (ckio) in the td1 to td4 cycles. the tap cy cle is used to wait for the completion of an auto-precharge induced by the read comman d in the sdram. in the tap cycle, a new command will not be issued to the same bank. ho wever, other banks can be accessed. the number of tap cycles is specified by bits wtrp1 and wtrp0 in cs3wcr. in this lsi, wait cycles can be inserted by specifying bits in csnwcr to connect the sdram with variable frequencies. figure 7.15 shows an example in which wait cycles are inserted. the number of cycles from the tr cycle where the actv command is output to the tc1 cycle where the reada command is output can be specified using bits wtrcd1 and wtrcd0 in cs3wcr. when bits wtrcd1 and wtrcd0 is set to one cycle or more, a trw cycle where the nop command is issued is inserted between the tr cycl e and tc1 cycle. the number of cycles from the tc1 cycle where the reada command is output to the td1 cycle where the read data is latched can be specified by bits a3cl1 and a3cl0 bits in cs3wcr in cs3wcr. this number of cycles corresponds to the synchronous dram cas latency. the cas latency for the synchronous dram is normally defined as up to three cycles. however, the cas latency in this lsi can be specified as one to four cycles . this cas latency can be achieved by connecting a latch circuit between this lsi and the synchronous dram.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 164 of 502 rej09b0239-0400 tc4 ckio a25 to a0 csn rd/ wr ras dqmxx d15 to d0 bs tap tr tc2 tc3 tc1 td4 tde td2 td3 td1 a11 * cas note: * address pin to be connected to pin a10 of sdram. figure 7.12 burst read ba sic timing (auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 165 of 502 rej09b0239-0400 tc4 ckio a25 to a0 csn rd/ wr ras dqmxx bs tap tr tc2 tc3 tc1 td4 tde td2 td3 td1 cas trw tw d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.13 burst read wait sp ecification timing (auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 166 of 502 rej09b0239-0400 single read: a read access ends in one cycle when data exists in non-cacheab le area and the data bus width is larger than or equal to access size. si nce the burst length is set to 1 in synchronous dram burst read/single write mode, only the required data is output. consequently, no unnecessary bus cycles are generated even when a cache-through area is accessed. figure 7.14 shows the single read basic timing. a25 to a0 csn rd/ wr ras dqmxx bs tap tr tc1 tde td1 cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.14 basic timing fo r single read (auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 167 of 502 rej09b0239-0400 burst write: a burst write occurs in the fo llowing cases in this lsi. 1. access size in writing is larger than data bus width. 2. write-back of the cache this lsi always accesses sdram wi th burst length 1. for example, write access of burst length 1 is performed consecutively eight times to write 16-byte consecutive data to the sdram that is connected to a 16-bit data bus. th e relationship between the access size and the number of bursts is shown in table 7.16. figure 7.15 shows a timing chart for burst writes. in burst write, the actv command is output in the tr cycle, the writ command is issued in the tc1, tc2, and tc3 cycles, and the writa command is issued to execute an auto-precharge in the tc4 cycle. in the write cycle, the write data is output simultaneously with the write comm and. after the write command with the auto- precharge is output, the trw1 cycle that waits for the auto-precharge initiation is followed by the tap cycle that waits for completion of the auto-p recharge induced by the writa command in the sdram. in the tap cycle, a new command will not be issued to the same bank. however, other cs areas and other banks can be accessed. the number of tr w1 cycles is specified by bits trwl1 and trwl0 in cs3wcr. the number of tap cycles is specified by bits wtrp1 and wtrp0 in cs3wcr. tc4 ckio a25 to a0 csn rd/ wr ras dqmxx bs tap tr tc2 tc3 tc1 trwl cas d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.15 basic timing fo r burst write (auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 168 of 502 rej09b0239-0400 single write: a write access ends in one cycle when data is written in non-cacheable area and the data bus width is larger than or equal to access size. figure 7.16 shows the single write basic timing. a25 to a0 csn rd/ wr ras dqmxx bs tap tr tc1 trwl cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.16 basic timing for single write (auto-precharge) bank active: the synchronous dram bank function is used to support high-speed accesses to the same row address. when the bactv bit in sdcr is 1, accesses are performed using commands without auto-precharge (read or writ). th is function is called bank-active function. when a bank-active function is used, prechargin g is not performed when the access ends. when accessing the same row address in the same bank , it is possible to is sue the read or writ command immediately, without issuing an actv command. since synchronous dram is internally divided into several banks, it is possible to keep one row address in each bank activated. if the next access is to a different row address, a pre command is first issued to precharge the relevant bank, then when precharging is completed, the access is performed by issuing an actv command followed by a read or wr it command. if this is follow ed by an access to a different row address, the access time will be longer because of the precharging performed after the access request is issued. the number of cycles between issuance of the pre command and the actv command is determined by bits wtrp1 and wtrp0 in csnwcr.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 169 of 502 rej09b0239-0400 in a write access, when an auto-precharge is perf ormed, a command cannot be issued to the same bank for a period of trwl + tap cycles after i ssuance of the writa comm and. when bank active mode is used, read or writ command can be issued successively if the row address is the same. the number of cycles can thus be re duced by trwl + tap cycles for each write. there is a limit on tras, the time for placing each bank in the active state. if there is no guarantee that another row address will be accessed within the period in which this va lue is maintained by program execution, it is necessary to set auto-refreshing and set the refresh cycle to no more than the maximum value of tras. a burst read cycle without auto-precharge is shown in figure 7.17, a burst read cycle for the same row address in figure 7.18, and a burst read cy cle for different row addresses in figure 7.19. similarly, a single write cycle without auto-prechar ge is shown in figure 7.20, a single write cycle for the same row address in figure 7.21, and a si ngle write cycle for different row addresses in figure 7.21. in figure 7.18, a tnop cycle in whic h no operation is performed is in serted before the tc cycle that issues the read command. the tnop cycle is inse rted to secure two cycles of cas latency for the dqmxx signal that specifies which byte data is read from sdram. if the cas latency is specified as two cycles or more, the tnop cycle is not inserted because the two cycles of latency can be secured even if the dqmxx sign al is asserted after the tc cycle. when bank active mode is set, if only acce sses to the respective banks in the area 3 are considered, as long as accesses to the same row address co ntinue, the operation starts with the cycle in figure 7.17 or 7.20, fo llowed by repetition of the cycle in figure 7.18 or 7.21. an access to a different area during this ti me has no effect. when a differe nt row address is accessed in the bank active state, the bus cycle shown in figure 7.19 or 7.22 is executed instead of that in figure 7.18 or 7.21. in bank active mode, too, all banks become inactive after a refresh cycle.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 170 of 502 rej09b0239-0400 tc4 a25 to a0 csn rd/ wr ras dqmxx bs tr tc2 tc3 tc1 td4 td2 td3 td1 tde cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.17 burst read timing (no auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 171 of 502 rej09b0239-0400 tc4 a25 to a0 csn rd/ wr ras dqmxx bs tc2 tc3 tc1 tnop td4 tde td2 td3 td1 cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.18 burst read timing (bank active, same row address)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 172 of 502 rej09b0239-0400 tc4 ckio a25 to a0 csn rd/ wr bs tpw tp tc2 tc3 tc1 td4 td2 td3 td1 tde tr ras dqmxx cas d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.19 burst read timing (b ank active, differen t row addresses)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 173 of 502 rej09b0239-0400 a25 to a0 csn rd/ wr bs tr tc1 ras dqmxx cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.20 single write timing (no auto precharge)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 174 of 502 rej09b0239-0400 a25 to a0 csn rd/ wr bs tnop tc1 ras dqmxx cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.21 single write timing (bank active, same row address)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 175 of 502 rej09b0239-0400 a25 to a0 csn rd/ wr bs tpw tp tc1 tr ras dqmxx cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.22 single write timing (bank active, differen t row addresses) refreshing: this lsi has a function for controlling synchronous dram refreshing. auto- refreshing can be performed by clearing the rmode bit to 0 and setting the rfsh bit to 1 in sdcr. a consecutive refreshing can be performed by setting bits rrc2 to rrc0 in rtcsr. if synchronous dram is not accessed for a long period, self-refreshing mode, in which the power consumption for data retention is low, can be activated by setting both the rmode bit and the rfsh bit to 1. 1. auto-refreshing refreshing is performed at intervals determined by the input clock selected by bits cks2 to cks0 in rtcsr, and the value set by in rt cor. the value of bits cks[2:0] in rtcor should be set so as to satisfy the given refresh interval for the synchronous dram used. first make the settings for rtcor, rtcnt, and the rmode, then make the cks[2:0] and rrc[2:0] settings. when the clock is selected by bits cks[2:0], rtcnt starts counting up from the value at that time. the rtcnt value is constantly compared with the rtcor value, and if the two values are the same, a refresh request is generated and an auto-refreshing is performed for the number of times specified by the rrc[2:0]. at the same time, rtcnt is cleared to 0 and the count-up is restarted.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 176 of 502 rej09b0239-0400 figure 7.23 shows the auto-refreshing cycle timing. after starting the auto-refreshing, pall command is issued in the tp cy cle to make all the banks to pr echarged state from active state when some bank is being precharged. then the ref command is issued in the trr cycle after inserting idle cycles of which number is specified by bits wtrp1 and wtrp0 in csnwcr. a new command is not issued for the duration of th e number of cycles sp ecified by bits wtrc1 and wtrc0 in csnwcr after the trr cycle. bits wtrc1 and wtrc0 in csnwcr must be set so as to satisfy the sdram refreshing cycle time (trc). an nop cycle is inserted between the tp cycle and trr cycle when the setting of bits wtrp1 and wtrp0 in csnwcr is longer than or equal to one cycle. a25 to a0 csn rd/ wr bs tpw tp trr trc trc trc hi-z ras dqmxx cas ckio d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.23 auto-refreshing timing
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 177 of 502 rej09b0239-0400 2. self-refreshing when self-refreshing mode is selected, the refresh timing and refresh addresses are generated within the synchronous dram. self-refreshing is activated by setting both the rmode bit and the rfsh bit in sdcr to 1. after starti ng the self-refreshing, the pall command is issued in the tp cycle after the completion of pre-charging the bank. the self command is then issued after inserting idle cycles of wh ich the number is specified by bits wtrp1 and wtrp0 in csnwsr. sy nchronous dram cannot be accesse d while self-refreshing. self- refreshing mode is cleared by clearing the rmode bit to 0. after self-refreshing mode has been cleared, command issuance is disabled for th e number of cycles sp ecified by bits wtrc1 and wtrc0 in csnwcr. self-refreshing timing is shown in figure 7.24. settings must be made immediately after clearing self-refreshing mode so that auto-refreshing is perform ed at the correct intervals. when self-refreshing is activat ed from the auto-refreshing mode, only clearing the rmode bit to 1 resumes auto-refreshing mode. if it takes lo ng time to start the auto-refreshing, setting rtcnt to the value of rtcor ? 1 starts the auto-re freshing immediately. after self-refreshing has been set, the self-refreshing mode continues even in standby mode, and is maintained even after recovery from standby mode by an interrupt. since the bsc registers are initialized at a power-o n reset, the self-refresh ing mode is cleared.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 178 of 502 rej09b0239-0400 ckio a25 to a0 csn rd/ wr bs tpw tp trr trc trc trc hi-z trc trc cke ras dqmxx cas d15 to d0 a11 * note: * address pin to be connected to pin a10 of sdram. figure 7.24 self-refreshing timing relationship between refresh requests and bus cycles: if a refresh request occurs during bus cycle execution, the refresh cycle must wa it for the bus cycle to be completed. if a new refresh request occurs while the previous refresh request is not performed, the previous refresh request is deleted. to refresh correctly, a bus cycle longer than the refresh interval or the bus busy must be prevented. power-on sequence: in order to use synchronous dram, mode setting must first be performed after turning the power on. to perform synchronous dram initialization correctly, the bsc registers must first be set, followed by writing to the synchronous dram mode register. when writing to the synchronous dram mode register, the address signal value at that time is latched by a combination of the csn , ras , cas , and rd/ wr signals. if the value to be set is x, write to the address of x + (h'f8fd5000) in words. in this operation, the data is ignored. to set burst read/single write, burst read/burst write, cas late ncy 2 to 3, wrap type = sequential, and burst length 1 supported by the lsi, arbitrary data is written to the addresses shown in table 7.17 in bytes. in this case, 0s are output at the external address pins of a12 or later.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 179 of 502 rej09b0239-0400 table 7.17 access address for sdram mode register write ? burst read/single write (burst length 1) data bus width cas latency access address external address pin 16 bits 2 h'f8fd5440 h'0000440 3 h'f8fd5460 h'0000460 ? burst read/burst write (burst length 1) data bus width cas latency access address external address pin 16 bits 2 h'f8fd5040 h'0000040 3 h'f8fd5060 h'0000060 mode register setting timing is shown in figure 7.25. the pall command (all bank precharge command) is issued first. the ref command (auto-refreshing command) is then issued eight times. the mrs command (mode register write command) is finally issued. idle cycles, of which number is specified by bits wtrp1 and wtrp0 in csnwcr, are inserted between the pall and the first ref commands. idle cy cles, of which number is speci fied by bits wtrc1 and wtrc0 in csnwcr, are inserted between the ref an d ref commands, and between the 8th ref and mrs commands. in addition, one or more idle cycles are inserted between the mrs and the next command. it is necessary to keep idle time of certain cy cles for sdram before is suing the pall command after turning the power on. refer the manual of the sdram for the idle time to be needed. when the pulse width of the reset signal is longer than the idle time, mode register setting can be started immediately after the reset, but care should be ta ken when the pulse width of the reset signal is shorter than the idle time.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 180 of 502 rej09b0239-0400 ckio a25 to a0 csn rd/ wr ras dqmxx d15 to d0 bs tpw tp trr a11 * cas note: * address pin to be connected to pin a10 of sdram. trc trc tmw hi-z tnop trc trr trc ref ref mrs pall figure 7.25 write timing for sdram mode register (based on jedec) 7.5.6 byte-selection sram interface the byte-selection sram interface is for acce ss to sram which has a byte-selection pin ( wen ( ben )). this interface is used to access to sram wh ich has 16-bit data pi ns and upper and lower byte selection pins, such as ub and lb. when the bas bit in csnwcr is cleared to 0 (initial value), the write access timing of the byte- selection sram interface is the same as that fo r the normal space interface. while in read access of a byte-selection sr am interface, the byte-selection signal is output from the wen ( ben ) pin, which is different from that for the normal sp ace interface. the basic access timing is shown in figure 7.26. in write access, data is written to the memory according to the timing of the byte- selection pin ( wen ( ben )). for details, refer to the data sheet for the corresponding memory. if the bas bit in csnwcr is set to 1, the wen ( ben ) pin and rd/ wr pin timings change. the basic access timing is shown in figure 7.27. in write access, data is wr itten to the memory according to the timing of the write enable pin (rd/ wr ). the data hold timing from rd/ wr negation to data write must be secured by setting bits hw1 to hw0 in csnwcr. figure 7.28 shows the access timing when a so ftware wait is specified.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 181 of 502 rej09b0239-0400 ckio a25 to a0 csn wen ( ben ) rd/ wr rd rd d15 to d0 d15 to d0 rd/ wr bs read write t1 t2 high figure 7.26 basic access timing fo r byte-selection sram (bas = 0)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 182 of 502 rej09b0239-0400 ckio a25 to a0 csn wen ( ben ) rd rd d15 to d0 d15 to d0 rd/ wr rd/ wr bs read write t1 t2 high figure 7.27 basic access timing fo r byte-selection sram (bas = 1)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 183 of 502 rej09b0239-0400 t2 ckio a25 to a0 csn rd/ wr wen ( ben ) d31 to d0 bs read write th th t1 tw rd rd/ wr d31 to d0 rd high figure 7.28 wait timing for byte-select ion sram (bas = 1) (software wait only)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 184 of 502 rej09b0239-0400 this lsi a16 a1 csn rd rd/ wr d15 d0 we1 ( be1 ) we0 ( be0 ) a16 a1 cs oe we i/o 15 i/o 0 ub lb 64 kwords x 16 bits sram ... ... ... ... figure 7.29 example of connection with 16-bit data-width byte-selection sram 7.5.7 pcmcia interface with this lsi, if addr ess map 2 is selected using the map bit in cmncr, the pcmcia interface can be specified in areas 5 and 6. areas 5 and 6 in the physical space can be used for the ic memory card and i/o card interface defined in th e jeida specifications ve rsion 4.2 (pcmcia2.1 rev. 2.1) by specifying bits type3 to type0 in csnbcr (n = 5b and 6b) to b'0101. in addition, bits sa1 and sa0 in csnwcr (n = 5b and 6b) assign the upper or lower 32 mbytes of each area to an ic memory card or i/o card interface. for example, if bits sa1 and sa0 in cs5bwcr are set to 1 and cleared to 0, respectively, the upper 32 mbytes and the lowe r 32 mbytes of area 5b are used as an ic memory card interf ace and i/o card interface, respectively. when the pcmcia interface is used, the bus size must be specified as 8 bits or 16 bits using bits bsz1 and bsz0 in cs5bbcr or cs6bbcr. figure 7.30 shows an example of a connection be tween this lsi and the pcmcia card. to enable insertion and removal of the pcmcia card with th e system power turned on , tri-state buffers must be connected between the lsi and the pcmcia card. in the jeida and pcmcia standards, operation in big endian mode is not clearly defined. consequently, the provided pcmcia interface in big endian mode is available only for this lsi.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 185 of 502 rej09b0239-0400 this lsi pc card (memory or i/o) a25 to a0 d7 to d0 ce1 ce2 oe we / pgm iord iowr reg a25 to a0 d7 to d0 d15 to d8 rd/ wr ce1a ce2a rd we iciord iciowr i/o port wait iois16 g g dir g g dir d15 to d8 wait iois16 cd1,cd2 card detection circuit figure 7.30 example of pcmcia interface connection basic timing for memory card interface: figure 7.31 shows the basic timing of the pcmcia ic memory card interface. if areas 5 and 6 in the physical space are speci fied as the pcmcia interface, accessing the common memory areas in areas 5 and 6 automatical ly accesses with the ic memory card interface. if the external bus frequenc y (ckio) increases, the setup times and hold times for the address pins (a25 to a0), card enable signals ( ce1a , ce2a , ce1b , ce2b ), and write data (d15 to d0) to the rd and we signals become insufficient. to prevent this error, this lsi can specify the setup times and hold ti mes for areas 5 and 6 in the physical space independently, using cs5bwcr and cs6bwcr. in the pcmcia interface, as in the normal space interface, a software wait or hardware wait can be inserted using the wait pin. figure 7.32 shows the pcmcia memory bus wait timing.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 186 of 502 rej09b0239-0400 tpcm1w ckio a25 to a0 cexx rd/ wr rd d15 to d0 we d15 to d0 bs read write tpcm2 tpcm1 tpcm1w tpcm1w figure 7.31 basic access timing fo r pcmcia memory card interface tpcm1w ckio a25 to a0 cexx rd/ wr rd d15 to d0 we d15 to d0 bs read write tpcm2 tpcm0 tpcm1 tpcm1w tpcm0w tpcm2w tpcm1w tpcm1w wait figure 7.32 wait timing for pcmcia memory card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, software wait = 1, hardware wait = 1)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 187 of 502 rej09b0239-0400 when 32 mbytes of the memory space are used as an ic memory card interf ace, a port is used to generate the reg signal that switches between the common memory and attribute memory. when the memory space used for the ic memory card in terface is 16 mbytes or less, pin a24 can be used as the reg signal by allocating a 16-mbyte common memory space and a 16-mbyte attribute memory space alternatively. pcmcia interface area is 32 mbytes (an i/o port pin is used as the reg ) area 5 : h'14000000 attribute memory/common memory i/o space attribute memory/common memory i/o space area 5 : h'16000000 area 6 : h'18000000 area 6 : h'1a000000 pcmcia interface area is 16 mbytes (a24 is used as the reg ) area 5 : h'14000000 attribute memory i/o space area 5 : h'15000000 area 5 : h'16000000 h'17000000 area 6 : h'18000000 area 6 : h'19000000 area 6 : h'1a000000 h'1b000000 common memory attribute memory i/o space common memory figure 7.33 example of pcmcia space assignment (cs5bwcr.sa[1:0] = b'10, cs6bwcr.sa[1:0] = b'10) basic timing for i/o card interface: figures 7.34 and 7.35 show the basic timings for the pcmcia i/o card interface. the i/o card and ic memory card interfaces are specified by an address to be accessed. when area 5 of the physical space is specified as the pcmcia and both bits sa1 and sa0 in cs5bwcr are set to 1, the i/o card interface can automati cally be specified by accessing the physical addresses from h'16000000 to h'17ffffff and from h'14000000 to h'15ffffff. when area 6 of the physical space is specified as the pcmc ia and both bits sa1 and sa0 in cs6bwcr are set to 1, the i/o card interface can automatically be specified by accessing the physical addresses from h'1a000000 to h'1bffffff and from h'18000000 to h'19ffffff. note that areas to be accessed as the pcmcia i/o card must be non-cached (space p2).
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 188 of 502 rej09b0239-0400 if the pcmcia card is accessed as an i/o card in little endian m ode, dynamic bus sizing for the i/o bus can be achieved using the iois16 signal. if the iois16 signal is driven high in a word-size i/o bus cycle while the bus width of area 6 is specifi ed as 16 bits, the bus wi dth is recognized as 8 bits and data is accessed twice in units of eight bits in the i/o bus cycle to be executed. the iois16 signal is sampled at the falling edge of the ckio signal in the tpci0, tpci0w, and tpci1 cycles when bits te d3 to ted0 are specified as 1.5 cycl es or more, and is reflected in the ce2 signal 1.5 cycles after the ckio sampling point. bits ted3 to ted0 must be specified appropriately to satisfy the se tup time of the pc card from iciord and iciowr to cen. figure 7.36 shows the dynamic bus sizing basic timing. note that the iois16 signal is not supported in big endian mode. in the big endian mode, the iois16 signal must be fixed low. tpci1w ckio a25 to a0 cexx rd/ wr iciord d15 to d0 iciowr d15 to d0 bs read write tpci2 tpci1 tpci1w tpci1w figure 7.34 basic timing fo r pcmcia i/o card interface
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 189 of 502 rej09b0239-0400 tpci1w ckio a25 to a0 cexx rd/ wr iciord d15 to d0 iciowr iois16 d15 to d0 bs read write tpci2 tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w wait figure 7.35 wait timing fo r pcmcia i/o card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, software wait = 1, hardware wait = 1) tpci1w ckio a25 to a0 ce1x rd/ wr iciord d15 to d0 iciowr iois16 d15 to d0 bs read write tpci2 ce2x tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w wait tpci1w tpci2 tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w figure 7.36 timing for dynamic bus si zing of pcmcia i/ o card interface (ted[3:0] = b'0010, teh[3:0] = b'0001, software waits = 3)
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 190 of 502 rej09b0239-0400 7.5.8 wait between access cycles data output in the previous cycle may conflict w ith that in the next cycle because the buffer-off timing of devices with slow access speed cannot be operated to satisfy the higher operating frequency of lsis. as a result of these conflict, the reliability of the device is low and malfunctions may occur. this lsi has a function that avoids data conflicts by inserting wait cycles between consecutive access cycles. the number of wait cycles be tween access cycles can be set by bits iww1 and iww0, bits iwrwd1 and iwrwd0, bits iwrws1 and iwrws0, bits iwrrd1 and iwrrd0, and bits iwrrs1 and iwrrs0 in csnbcr. the conditions for setting the wait cycles between access cycles (idle cycles) are shown below. 1. consecutive accesses are write-read or write-write 2. consecutive accesses are read-write for different areas 3. consecutive accesses are read-write for the same area 4. consecutive accesses are re ad-read for different areas 5. consecutive accesses are read-read for the same area 7.5.9 others reset: the bus state controller (bsc) can be initialized completely only by a power-on reset. at power-on reset, all signals are negated and output buffers are turned off regardless of the bus cycle state. all control registers are initialized. in stan dby mode and sleep mode, control registers of the bsc are not initialized. some flash memories may stipul ate a minimum time from reset release to the first access. to ensure this minimum time, the bsc supports a 5-bit counter (rwtcnt). at a power-on reset, the rwtcnt contents are cleared to 0. after a power-on reset, rwtcnt is counted up in synchronization with the ckio signal and an external access will not be generated until rwtcnt is counted up to h'007f. access from the site of th e lsi internal bus master: there are three types of lsi internal buses: a cache bus, internal bus, and peripheral bus. the cpu and cache memory are connected to the cache bus. the bsc is connected to the internal bus. low-speed peripheral modules are connected to the peripheral bu s. internal memory other than the cache memory and debugging modules such as the ubc are conn ected to both the cache bus and internal bus. access from the cache bus to the internal bus is enabled but access from the in ternal bus to the cache bus is disabled.
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 191 of 502 rej09b0239-0400 if the cpu initiates read access for the cache, the cac he is searched. if th e cache stores data, the cpu latches the data and completes the read access. if the cache does not store data, the cpu performs four consecutive longword read cycles to perform cach e fill operations via the internal bus. if a cache miss occurs in byte or word operan d access or at a branch to an odd word boundary (4n + 2), the cpu performs four consecutive longword accesses to perform a cache fill operation on the external interface. for a cache-through area, the cpu performs access according to the actual access addresses. for an instruction fetch to an even word boundary (4n), the cpu performs longword access. for an instruc tion fetch to an odd word bound ary (4n + 2), the cpu performs word access. for a read cycle of a cache-through area or an on-c hip peripheral module, the read cycle is first accepted and then read cycle is initiated. the read data is sent to the cpu via the cache bus. in a write cycle for the cache area, the write cy cle operation differs accord ing to the cache write methods. in write-back mode, the cache is first searched. if data is detected at the address corresponding to the cache, the data is then re-wr itten to the cache. in the actual me mory, data will not be re-written until data in the corresponding address is re-wr itten. if data is not detected at the address corresponding to the cache, the cache is updated. in this case, data to be updated is first saved to the internal buffer, 16-byte data including the data corresponding to the address is then read, and data in the corresponding access of the cache is finally updated. following these operations, a write-back cycle for the saved 16-byte data is executed. in write-through mode, the cache is first searched . if data is detected at the address corresponding to the cache, the data is re-writt en to the cache simultaneously with the actual write via the internal bus. if data is not detected at the address corresponding to the cache, the cache is not updated but an actual write is performed via the internal bus. since the bsc incorporates a 1-st age write buffer, the bsc can ex ecute an access via the internal bus before the previous external bus cycle is completed in a write cycle. if the on-chip module is read or written after the external low-speed memory is written, the on-chip module can be accessed before the completion of the exte rnal low-speed memo ry write cycle. in read cycles, the cpu is placed in the wait cycl e until read operation has been completed. to continue the process after the data write to the device has been completed, perform a dummy read to the same address to check for completion of the write before the next process to be executed. the write buffer of the bsc functions in the sa me way for an access by a bus master other than the cpu such as the dmac or e-dmac. accordingly, to perfor m dual address dma transfers, the next read cycle is initiated before the previous write cycle is completed. note, however, that if
section 7 bus state controller (bsc) rev. 4.00 sep. 13, 2007 page 192 of 502 rej09b0239-0400 both the dma source and destinati on addresses exist in external memory space, the next write cycle will not be initiated until the previous write cycle is completed. on-chip periphera l module access: to access an on-chip modul e register, two or more peripheral module clock (p ) cycles are required. care must be taken in system design.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 193 of 502 rej09b0239-0400 section 8 clock pulse generator (cpg) this lsi has a clock pulse generator (cpg) that generates an internal clock (i ), a peripheral clock (p ), and a bus clock (b ). the cpg consists of an oscillator, pll circuits, and divider circuits. 8.1 features ? three clock modes selection of three clock modes depending on the frequency of a clock source and whether a crystal resonator or external clock input is in use. ? three clocks generated independently an internal clock (i ) for the cpu and cache; a peripheral clock (p ) for the on-chip peripheral modules; a bus clock (b = ckio) for the external bus interface. ? frequency change function frequencies of the internal clock and peripheral clock can be changed independently using the pll circuit and divider circuit within the cpg. frequencies are changed by software using the frequency control register (frqcr). ? power-down mode control the clock can be stopped in sleep mode and software standby mode and specific modules can be stopped using the module standby function. a block diagram of the cpg is shown in figure 8.1.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 194 of 502 rej09b0239-0400 ckio pll circuit 1 ( 1, 2) pll circuit 2 ( 2, 4) 1 1/2 1/4 oscillator unit internal clock (i ) internal bus bus interface [legend] frqcr: frequency control register stbcr: standby control register stbcr2: standby control register 2 stbcr3: standby control register 3 stbcr4: standby control register 4 peripheral clock (p ) bus clock (b = ckio) extal frqcr stbcr stbcr2 stbcr3 stbcr4 cpg control unit clock frequency control circuit standby control circuit divider 1 md2 md1 md0 xtal crystal oscillator figure 8.1 block diagram of cpg
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 195 of 502 rej09b0239-0400 the clock pulse generator blocks function as follows: pll circuit 1: pll circuit 1 leaves the input clock frequency from the pll circuit 2 unchanged or doubles it. the multiplication ratio is set by the frequency control register. the phase of the rising edge of the internal clock is controlled so that it will match the phase of the rising edge of the ckio pin. pll circuit 2: pll circuit 2 doubles or quadruples the clock frequency input from the crystal oscillator or the extal pin. the multiplication ratio is fixed for each clock operating mode. the clock operating mode is set with pins md0, md1, or md2. crystal oscillator: the crystal oscillator is an oscillator circuit when a crystal resonator is connected to the xtal and extal pins. the crysta l oscillator can be used by setting the clock operating mode. divider 1: divider 1 generates clocks with the frequencies used by the internal clock, peripheral clock, and bus clock. the frequency output as the internal clock is always the same as that of the devider1 output. the frequency output as the bus clock is automatically selected so that it is the same as the frequency of the ckio signal according to the multiplication ratio of pll circuit 1. the frequencies can be 1, 1/2, or 1/4 times the ou tput frequency of pll circuit 1, as long as it stays at or above the frequency of the ckio pin. the division ratio is set in the frequency control register. clock frequency control circuit: the clock frequency control circuit controls the clock frequency using pins md0, md1, and md2 and the frequency control register. standby control circuit: the standby control circuit controls the state of the on-chip oscillator circuit and other modules during clock switching and in software standby mode. frequency control register: the frequency control register has control bits assigned for the following functions: clock output/non-output from the ckio pin, the frequency multiplication ratio of pll circuit 1, and the frequency division ratio of the peripheral clock. standby control register: the standby control register has bits for controlling the power-down modes. for details, see section 10, power-down modes.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 196 of 502 rej09b0239-0400 8.2 input/output pins table 8.1 shows the cpg pin configuration. table 8.1 pin configuration pin name abbr. i/o description mode control pins * md0 input set the clock operating mode. md1 input set the clock operating mode. md2 input set the clock operating mode. clock input pins xtal output connects a crystal resonator. extal input connects a crystal resonator or an external clock. clock output pin ckio output outputs an external clock. note: * the values of these mode control pins are sampled only at a power-on reset or in a software standby with the mdchg bit in stb cr to 1. this can prevent the erroneous operation of this lsi. 8.3 clock operating modes table 8.2 shows the relationship between the mode control pins (md2 to md0) combinations and the clock operating modes. table 8.3 shows the usable frequency ranges in the clock operating modes and the frequency range of the input clock. table 8.2 mode control pins and clock operating modes pin values clock i/o clock operating mode md2 md1 md0 source output pll2 pll1 ckio frequency 1 0 0 1 extal ckio on ( 4) on ( 1, 2) (extal) 4 2 0 1 0 crystal resonator ckio on ( 4) on ( 1, 2) (crystal resonator) 4 5 1 0 1 extal ckio on ( 2) on ( 1, 2) (extal) 2 6 1 1 0 crystal resonator ckio on ( 2) on ( 1, 2) (crystal resonator) 2 mode 1: the frequency of the external clock input from the extal pin is quadrupled by pll circuit 2, and then the clock is supplied to this lsi. since the input clock frequency ranging 10 mhz to 12.5 mhz can be used, the ckio frequency ranges from 40 mhz to 50 mhz.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 197 of 502 rej09b0239-0400 mode 2: the frequency of the on-chip crystal oscillator output is quadrupled by pll circuit 2, and then the clock is supplied to this lsi. since the crystal resonator frequency ranging 10 mhz to 12.5 mhz can be used, the ckio frequen cy ranges from 40 mhz to 50 mhz. mode 5: the frequency of the external clock from the extal pin is doubled by pll circuit 2, and then the clock is supplied to this lsi. since the input clock frequency ranging 10 mhz to 25 mhz, the ckio frequency ranges from 20 mhz to 50 mhz. mode 6: the frequency of the on-chip crystal oscillator output is doubled by pll circuit 2, and then the clock is supplied to the lsi. since the crystal oscillation frequency ranging 10 mhz to 25 mhz can be used, the ckio frequency ranges from 20 mhz to 50 mhz. table 8.3 possible combination of clock modes and frqcr values mode frqcr register value pll circuit 1 pll circuit 2 clock ratio * (i:b:p) input clock frequency range ckio pin frequency range h'1000 on ( 1) on ( 4) 4:4:4 1 or 2 h'1001 on ( 1) on ( 4) 4:4:2 10 mhz to 12.5 mhz 40 mhz to 50 mhz h'1003 on ( 1) on ( 4) 4:4:1 h'1101 on ( 2) on ( 4) 8:4:4 h'1103 on ( 2) on ( 4) 8:4:2 5 or 6 h'1000 on ( 1) on ( 2) 2:2:2 h'1001 on ( 1) on ( 2) 2:2:1 10 mhz to 25 mhz 20 mhz to 50 mhz h'1003 on ( 1) on ( 2) 2:2:1/2 h'1101 on ( 2) on ( 2) 4:2:2 h'1103 on ( 2) on ( 2) 4:2:1 note: * input clock is assumed to be 1. cautions: 1. the internal clock frequency is the product of the frequency of the ckio pin and the frequency multiplication ratio of pll circuit 1. 2. the peripheral clock frequency is the product of the frequency of the ckio pin, the frequency multiplication ratio of pll circuit 1, and the division ratio of divider 1. do not set the peripheral clock frequency lower than the ckio pin frequency. 3. 1, 1/ 2, or 1/ 4 can be used as the division ratio of divider 1. set the rate in the frequency control register.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 198 of 502 rej09b0239-0400 4. the output frequency of pll circuit 1 is the product of the frequency of the ckio pin and the multiplication ratio of pll circuit 1. it is set by the frequency control register. 5. the bus clock frequency is always set to be equal to the frequency of the ckio pin. 6. the clock mode, the frqcr register value, and the frequency of the input clock should be decided to satisfy the range of operating frequency specified in section 19, electrical characteristics, with referring to table 8.3. 8.4 register descriptions the cpg has the following registers. for details on the addresses of these registers and the states of these regi sters in each processing state, see section 18, list of registers. ? frequency control register (frqcr) 8.4.1 frequency control register (frqcr) frqcr is a 16-bit readable/writable register that specifies whether a clock is output from the ckio pin in standby mode, the frequency multiplication ratio of pll circuit 1, and the frequency division ratio of the periph eral clock. only word access can be used on frqcr. frqcr is initialized by a power-on reset due to the external input signal. however, it is not initialized by a power-on reset due to a wdt overflow.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 199 of 502 rej09b0239-0400 bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 ckoen 1 r/w clock output enable specifies whether a clock continues to be output from the ckio pin or the output level of the ckio signal is fixed when leaving software standby mode. the ckio output is fixed low when this bit is set to 0. therefore, the malfunction of external circuits because of an unstable ckio clock when leaving software standby mode can be prevented. 0: output level of the ckio signal is fixed low in software standby mode. 1: clock input to the extal pin is output to the ckio pin during software standby mode in clock mode 1 or 5. however, the output level of the ckio pin is fixed low for two cycles of p when changing from the normal mode to the standby mode. this prevents hazard which occurs when the source of the ckio signal is changed from the pll2 output to the extal signal. 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 9 8 stc2 stc1 stc0 0 0 0 r/w r/w r/w pll circuit 1 frequency multiplication ratio 000: 1 001: 2 other values: setting prohibited 7 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 200 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 1 0 pfc2 pfc1 pfc0 0 1 1 r/w r/w r/w peripheral clock frequency division ratio specify the division ratio of the peripheral clock frequency with respect to the output frequency of pll circuit 1. 000: 1 001: 1/2 011: 1/4 other values: setting prohibited 8.5 changing frequency the internal clock frequency can be changed by ch anging the multiplication ratio of pll circuit 1. the peripheral clock frequency can be changed either by changing the multiplication ratio of pll circuit 1 or by changing the division ratio of divider 1. all of these are controlled by software through the frequency control register. the methods are described below. 8.5.1 changing multiplication ratio the pll lock time must be preserved when the mu ltiplication ratio of pll circuit 1 is changed. the on-chip wdt counts for preserving the pll lock time. 1. in the initial state, the multiplication ratio of pll circuit 1 is 1. 2. set a value that satisfies the given pll lock time in the wdt and stop the wdt. the following must be set. ? tme bit in wtcsr = 0: wdt stops ? bits cks2 to cks0 in wtcsr: division ratio of wdt count clock ? wtcnt: initial counter value 3. set the desired value in bits stc2 to stc0 while the mdchg bit in stbcr is 0. the division ratio can also be set in bits pfc2 to pfc0. 4. this lsi pauses internally and the wdt star ts incrementing. the in ternal and peripheral clocks both stop and only the wdt is supplied with the clock. the clock will continue to be output on the ckio pin. 5. supply of the specified clock starts at a wdt count overflow, and this lsi starts operating again. the wdt stops after it overflows.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 201 of 502 rej09b0239-0400 notes: 1. when the mdchg bit in stbcr is set to 1, changing the frqcr value has no effect on the operation immediately. for details, see section 8.5.3, changing clock operating mode. 2. the multiplication ratio should be changed after completion of the operation, if the on- chip peripheral module is operating. the internal and peripheral clocks are stopped during the multiplication ratio is changed. the communication er ror may occur by the peripheral module communicating to the external ic, and the time error may occur by the timer unit (except the wdt) . the edge detection of external interrupts (nmi and irq7 to irq0) cannot be performed. 8.5.2 changing division ratio the wdt will not count unless the multiplication ratio is changed simultaneously. 1. in the initial state, pfc2 to pfc0 = 011. 2. set the desired values in bits pfc2 to pfc0 while the mdchg bit in stbcr is 0. the values that can be set are limited by the clock mode and the multiplication ratio of pll circuit 1. note that if the wrong value is se t, this lsi will malfunction. 3. the clock is immediately changed to the new division ratio. note: when the mdchg bit in stbcr is set to 1, changing the frqcr value has no effect on the operation immediately. for details, see section 8.5.3, changing clock operating mode.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 202 of 502 rej09b0239-0400 8.5.3 changing clock operating mode the values of the mode control pins (md2 to md0) that define a clock operating mode are fetched at a power-on reset and software standby whil e the mdchg bit in stbcr is set to 1 register. even if changing the frqcr with the mdchg bit set to 1, the clock mode cannot immediately be changed to the specified clock mode. this change can be reflected as a multiplication ratio or a division ratio after leaving software standby mode to change operating modes. reducing the pll settling time without changing again the multiplicati on ratio after the operating mode changing is possible by the use of this. the procedures for the mode change using software standby mode are described below. 1. set bits md2 to md0 to the desired clock operating mode. 2. set both the stby and mdchg bits in stbcr to 1. 3. set the adequate value to the wdt so that th e given oscillation settling time can be satisfied. then stop the wdt. 4. set frqcr to the desired mode. set bits stc2 to stc0 to the desired multiplication ratio. at this time, a division ratio can be set in bits pfc2 to pfc0. during the operation before the mode change, the clock cannot be changed to the specified clock. 5. enter software standby mode using the sleep instruction. 6. leave software standby mode using an interrupt. 7. after leaving software standby mode, this lsi starts the operation with the value of frqcr that has been set before the mode change. notes: 1. pins md2 to md0 should be set during the operation before the mode change or during software standby mode before requesting an interrupt. 2. clear the stby bit in stbcr in the exception handling routine for the interrupt in step 6. otherwise, software standby mode is entered again. for details, see section 10.5.2, canceling software standby mode. 3. once bits stc2 to stc0 are changed, th e clock is not switched to the specified clock even if only bits pfc2 to pfc0 are changed. when bits stc2 to stc0 are changed after the mdchg bit has been set to 1, the frqcr setting must not be made until the clock mode is changed.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 203 of 502 rej09b0239-0400 8.6 notes on board design when using an extern al crystal resonator: place the crystal resonator, capacitors cl1 and cl2, and damping resistor r close to the extal and xtal pins. to prevent induction from interfering with correct oscillation, use a common grounding point for the capacitors connected to the resonator, and do not locate a wiring pattern near these components. extal xtal this lsi avoid crossing signal lines cl1 cl2 r note : although the recommended value for cl1 and cl2 is 20pf and the recommended value for r is 0 ?, the values should be determined after consultation with the crystal manufacturer. figure 8.2 points for attention when using crystal resonator bypass capacitors: insert a laminated ceramic capacito r as a bypass capacitor for each v ss /v ss q and v cc /v cc q pair. mount the bypass capacitors to the power supply pins, and use components with a frequency characteristic suitable for the opera ting frequency of the lsi, as well as a suitable capacitance value. ? digital power supply pairs for internal logic a4-b4, b11-a11, d15-d14, e2-e1, g12-g13, h4-h3, j12-j13, m1-m2, m8-n8, p5-r5 ? power supply pairs for input and output a1-b1, a7-b7, a15-a14, f15-f14, k1-k2, m12-p14, m15-m14, r1-r2, r10-p10 ? power supply pairs for pll n13-n14, n13-p15 when using a pll oscillator circuit: keep the wiring from the pll v cc and pll v ss connection pattern to the power supply pins short, and make the pattern width large, to minimize the inductance component. the analog power supply system of the pll is sensitive to noise. therefore, the system malfunction may occur by the intervention with other power supply. do not supply the analog power supply with the same resource as the digital power supply of v cc and v cc q.
section 8 clock pulse generator (cpg) rev. 4.00 sep. 13, 2007 page 204 of 502 rej09b0239-0400
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 205 of 502 rej09b0239-0400 section 9 watchdog timer (wdt) this lsi includes the watchdog timer (wdt) that can reset this lsi by the overflow of the counter when the value of the counter has not been updated because of a system runaway. the wdt is a single-channel timer that uses a peri pheral clock as an input and counts the clock settling time when leaving software standby mode and temporary standby state, such as frequency changes. it can also be used as an interval timer. 9.1 features the wdt has the following features: ? can be used to ensure the clock settling time. the wdt can be used when leaving software standby mode and the temporary standby state which occur when the clock frequency is changed. ? can switch between watchdog timer mode and interval timer mode. ? internal resets in watchdog timer mode internal resets are generated when the counter overflows. ? interrupts are generated in interval timer mode interval timer interrupts are generated when the counter overflows. ? choice of eight counter input clocks eight clocks ( 1 to 1/4096) that are obtained by dividing the peripheral clock can be chosen. figure 9.1 is a block diagram of the wdt.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 206 of 502 rej09b0239-0400 wtcsr standby control bus interface wtcnt divider clock selector clock standby mode peripheral clock (p ) standby cancellation reset control clock selection wdt overflow internal reset request interrupt control interrupt request wtcsr: wtcnt: [legend] watchdog timer control/status register watchdog timer counter figure 9.1 block diagram of wdt 9.2 register descriptions the wdt has the following two registers. for deta ils on the addresses of these registers and the states of these registers in each processing state, see sec tion 18, list of registers. ? watchdog timer counter (wtcnt) ? watchdog timer control/status register (wtcsr) 9.2.1 watchdog timer counter (wtcnt) wtcnt is an 8-bit readable/writable register that increments on the selected clock. when an overflow occurs, it generates a reset in watchdog timer mode and an interrupt in interval time mode. wtcnt is not initialized by an internal power-on reset due to the wdt overflow. wtcnt is initialized to h'00 by a power-on reset input to the pin and an h-udi reset. use a word access to write to wt cnt, with h'5a in the upper byte. use a byte access to read wtcnt.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 207 of 502 rej09b0239-0400 note: the writing method for wtcnt differs from other registers so that the wtcnt value cannot be changed accidentally. for details, s ee section 9.2.3, notes on register access. 9.2.2 watchdog timer control/status register (wtcsr) wtcsr is an 8-bit readable/writable register composed of bits to select the clock used for the counting, bits to select the timer mode and overflow flags, and enable bits. wtcsr holds its value in the internal reset state due to the wdt overflow. wtcsr is initialized to h'00 by a power-on reset input to the pin and an h-udi reset. to use it for counting the clock settling time when leaving software standby mode, wtcsr holds its value after a counter overflow. use a word access to write to wt csr, with h'a5 in the upper byte. use a byte access to read wtcsr. note: the writing method for wtcnt differs from other registers so that the wtcnt value cannot be changed accidentally. for details, s ee section 9.2.3, notes on register access.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 208 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 tme 0 r/w timer enable starts and stops timer operation. clear this bit to 0 when using the wdt in software standby mode or when changing the clock frequency. 0: timer disabled: count-up stops and wtcnt value is retained 1: timer enabled 6 wt/it 0 r/w timer mode select selects whether to use the wdt as a watchdog timer or an interval timer. 0: interval timer mode 1: watchdog timer mode note: if wt/it is modified when the wdt is operating, the up-count may not be performed correctly. 5 ? 0 r reserved this bit is always red as 0. the write value should always be 0. 4 wovf 0 r/w watchdog timer overflow indicates that wtcnt has overflowed in watchdog timer mode. this bit is not set in interval timer mode. 0: no overflow 1: wtcnt has overflowed in watchdog timer mode 3 iovf 0 r/w interval timer overflow indicates that wtcnt has overflowed in interval timer mode. this bit is not set in watchdog timer mode. 0: no overflow 1: wtcnt has overflowed in interval timer mode
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 209 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 1 0 cks2 cks1 cks0 0 0 0 r/w r/w r/w clock select 2 to 0 these bits select the clock to be used for the wtcnt count from the eight types obtainable by dividing the peripheral clock (p ). the overflow period that is shown inside the parenthesis in the table is the value when the peripheral clock (p ) is 25 mhz. 000: p (10 s) 001: p /4 (41 s) 010: p /16 (164 s) 011: p /32 (328 s) 100: p /64 (655 s) 101: p /256 (2.62 ms) 110: p /1024 (10.49 ms) 111: p /4096 (41.94 ms) note: if bits cks2 to cks0 are modified when the wdt is operating, the up-count may not be performed correctly. ensure that these bits are modified only when the wdt is not operating. 9.2.3 notes on register access the watchdog timer counter (wtcnt) and watchdog timer control/status register (wtcsr) are more difficult to write to than other registers. the procedure for writing to these registers is given below. writing to wtcnt and wtcsr: these registers must be written by a word transfer instruction. they cannot be written by a byte or longword transfer instruction. when writing to wtcnt, set the upper byte to h'5a and transfer the lower byte as the write data, as shown in figure 9.2. when writing to wtcsr, set the upper byte to h'a5 and transfer the lower byte as the write data. this transfer procedure writes the lower byte data to wtcnt or wtcsr.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 210 of 502 rej09b0239-0400 15 8 7 0 h'5a write data address: h'f815ff84 wtcnt write 15 8 7 0 h'a5 write data address: h'f815ff86 wtcsr write figure 9.2 writing to wtcnt and wtcsr 9.3 wdt operation 9.3.1 canceling software standbys the wdt can be used to cancel software standby mode with an nmi interrupt or external interrupt (irq). the procedure is described below. (the wdt does not run when resets are used for canceling, so keep the res pin low until the clock stabilizes.) 1. before transition to software standby mode, always clear the tme bit in wtcsr to 0. when the tme bit is 1, an erroneous reset or interv al timer interrupt may be generated when the count overflows. 2. set the type of count clock used in the cks2 to cks0 bits in wtcsr and the initial values for the counter in wtcnt. these values should ensure that the time till count overflow is longer than the clock oscillation settling time. 3. move to software standby mode by executing a sleep instruction to stop the clock. 4. the wdt starts counting by detecting the change of input levels of the nmi or irq pin. 5. when the wdt count overflows, the cpg st arts supplying the clock and the processor resumes operation. the wovf flag in wtcsr is not set when this happens. 6. since the wdt continues counting from h'00, set the stby bit in stbcr to 0 in the interrupt processing program and this will stop the wdt to count. when the stby bit remains 1, the lsi again enters software standby mode when the wdt has counted up to h'80. this software standby mode can be cancel ed by a power-on reset.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 211 of 502 rej09b0239-0400 9.3.2 changing frequency to change the multiplication ratio of pll circuit 1, use the wdt. when changing the frequency only by switching the divider, do not use the wdt. 1. before changing the frequenc y, always clear the tme bit in wtcsr to 0. when the tme bit is 1, an erroneous reset or interval timer inte rrupt may be generated when the count overflows. 2. set the type of count clock used in the cks2 to cks0 bits in wtcsr and the initial values for the counter in wtcnt. these values should ensure that the time till count overflow is longer than the clock oscillation settling time. 3. when bits stc2 to stc0 in the frequency c ontrol register (frqcr) is written, the processor stops temporarily. the wdt starts counting. 4. when the wdt count overflows, the cpg re sumes supplying the cl ock and the processor resumes operation. the wovf flag in wtcsr is not set when this happens. 5. wtcnt stops at the value of h'00. 6. before changing wtcnt after the execution of the frequency change instruction, always confirm that the valu e of wtcnt is h'00 by reading wtcnt. 9.3.3 using watchdog timer mode 1. set the wt/it bit in wtcsr to 1, set the type of count clock in bits cks2 to cks0, and set the initial value of the counter in wtcnt. 2. set the tme bit in wtcsr to 1 to start the count in watchdog timer mode. 3. while operating in watchdog timer mode, rewrite the counter periodically to h'00 to prevent the counter from overflowing. 4. when the counter overflows, the wdt sets the wovf flag in wtcsr to 1 and generates a power-on reset. wtcnt then resumes counting.
section 9 watchdog timer (wdt) rev. 4.00 sep. 13, 2007 page 212 of 502 rej09b0239-0400 9.3.4 using interval timer mode when operating in interval timer mode, interval ti mer interrupts are generated at every overflow of the counter. this enables interrupts to be generated at set periods. 1. clear the wt/it bit in wtcsr to 0, set the type of count clock in the cks2 to cks0 bits, and set the initial value of the counter in wtcnt. 2. set the tme bit in wtcsr to 1 to start the count in interval timer mode. 3. when the wtcnt overflows, the wdt sets the iovf flag in wtcsr to 1 and an interval timer interrupt request is sent to the intc. the wtcnt then resumes counting. 9.4 usage note note the following when using the wdt. 1. when using the wdt in interval mode, no overflow occurs by the h'00 immediately after writing h'ff to wdtcnt. (iovf in wtcsr is not set.) the overflow occurs at a point when the count reaches h'00 after one cycle. this does not occur when the wdt is used in watchdog timer mode.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 213 of 502 rej09b0239-0400 section 10 power-down modes this lsi supports the following power-down modes: sleep mode, software standby mode, module standby mode. 10.1 features ? supports sleep mode, software standby mode, and module standby 10.1.1 types of power-down modes this lsi has the following power-down modes. ? sleep mode ? software standby mode ? module standby mode (cache, u-memory, ubc, h-ud i, and on-chip peri pheral modules) table 10.1 shows the methods to make a transition from the program execution state, as well as the cpu and peripheral module states in each mode and the procedures for canceling each mode.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 214 of 502 rej09b0239-0400 table 10.1 states of power-down modes state mode transition method cpg cpu cpu register on-chip memory on-chip peripheral modules pins canceling procedure sleep execute sleep instruction with stby bit in stbcr cleared to 0. runs halts held halts (contents remained) run held ? interrupt other than user break ? reset software standby execute sleep instruction with stby bit in stbcr set to 1. halts halts held halts (contents remained) halt held ? nmi, irq ? reset module standby set mstp bits in stbcr2 to stbcr4 to 1. runs runs held specified module halts (contents remained) specified module halts held ? clear mstp bit to 0 ? power-on reset
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 215 of 502 rej09b0239-0400 10.2 input/output pins table 10.2 lists the pins used for the power-down modes. table 10.2 pin configuration pin name abbr. i/o description reset input pin res input reset input signal. reset by low level. 10.3 register descriptions there are following registers used for the power-down modes. for details on the addresses of these registers and the states of these registers in each processing state, see section 18, list of registers. ? standby control register (stbcr) ? standby control register 2 (stbcr2) ? standby control register 3 (stbcr3) ? standby control register 4 (stbcr4)
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 216 of 502 rej09b0239-0400 10.3.1 standby control register (stbcr) stbcr is an 8-bit readable/writable register that specifies the state of the power-down mode. bit bit name initial value r/w description 7 stby 0 r/w standby specifies transition to software standby mode. 0: executing sleep instruction makes this lsi sleep mode 1: executing sleep instruction makes this lsi software standby mode 6 to 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 mdchg 0 r/w md2 to md0 pin control specifies whether or not the values of pins md2 to md0 are reflected in software standby mode. the values of pins md2 to md0 are reflected at returning from software standby mode by an interrupt when the mdchg bit has been set to 1. 0: the values of pins md 2 to mo0 are not reflected in software standby mode. 1: the values of pins md2 to md0 are reflected in software standby mode. 2 to 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 217 of 502 rej09b0239-0400 10.3.2 standby control register 2 (stbcr2) stbcr2 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit bit name initial value r/w description 7 mstp10 0 r/w module stop bit 10 when this bit is set to 1, the supply of the clock to the h-udi is halted. 0: h-udi operates 1: clock supply to h-udi halted 6 mstp9 0 r/w module stop bit 9 when this bit is set to 1, the supply of the clock to the ubc is halted. 0: ubc operates 1: clock supply to ubc halted 5 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 mstp5 0 r/w module stop bit 5 when this bit is set to 1, the supply of the clock to the cache memory is halted. 0: cache memory operates 1: clock supply to cache memory halted 1 mstp4 0 r/w module stop bit 4 when this bit is set to 1, the supply of the clock to the u memory is halted. 0: u memory operates 1: clock supply to the u memory halted 0 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 218 of 502 rej09b0239-0400 10.3.3 standby control register 3 (stbcr3) stbcr3 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 mstp15 0 r/w module stop bit 15 when this bit is set to 1, the supply of the clock to the cmt is halted. 0: cmt operates 1: clock supply to cmt halted 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 mstp13 0 r/w module stop bit 13 when this bit is set to 1, the supply of the clock to the scif2 is halted. 0: scif2 operates 1: clock supply to scif2 halted 1 mstp12 0 r/w module stop bit 12 when this bit is set to 1, the supply of the clock to the scif1 is halted. 0: scif1 operates 1: clock supply to scif1 halted 0 mstp11 0 r/w module stop bit 11 when this bit is set to 1, the supply of the clock to the scif0 is halted. 0: scif0 operates 1: clock supply to scif0 halted
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 219 of 502 rej09b0239-0400 10.3.4 standby control register 4 (stbcr4) stbcr4 is an 8-bit readable/writable register that controls the operation of modules in power- down mode. bit bit name initial value r/w description 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 mstp23 0 r/w module stop bit 23 when this bit is set to 1, the supply of the clock to the hif is halted. 0: hif operates 1: clock supply to hif halted 3 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 mstp19 0 r/w module stop bit 19 setting mstp19 to1 stops supplying clock to redundancy logic. set mstp19 to 1 immediately after releasing a power-on reset. 0: redundancy logic is in operation 1: stops supplying clock to redundancy logic
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 220 of 502 rej09b0239-0400 10.4 sleep mode 10.4.1 transition to sleep mode executing the sleep inst ruction when the stby bit in stbcr is 0 causes a transition from the program execution state to sleep mode. although the cpu halts immediat ely after executing the sleep instruction, the contents of its internal registers remain unchanged. the on-chip peripheral modules continue to operate in sleep mode and the clock continues to be output to the ckio pin. 10.4.2 canceling sleep mode sleep mode is canceled by an in terrupt other than a user break (nmi, h-udi, irq, and on-chip peripheral module) or a reset. canceling with interrupt: when a user-break, nmi, h-udi, irq, or on-chip peripheral module interrupt occurs, sleep mode is canceled and interrupt exception handling is executed. when the priority level of an irq or on-chip peripheral module interrupt is lower than the interrupt mask level set in the status register (sr) of the cp u, an interrupt request is not accepted preventing sleep mode from being canceled. canceling with reset: s leep mode is canceled by a power-on reset or an h-udi reset. 10.5 software standby mode 10.5.1 transition to software standby mode this lsi switches from a prog ram execution state to software standby mode by executing the sleep instruction when the stby bit in stbcr is 1. in softwa re standby mode, not only the cpu but also the clock and on-chip peripheral modules halt. the clock output from the ckio pin also halts. the contents of the cpu and cache registers remain unchanged. some registers of on-chip peripheral modules are, however, initialized. table 10.3 lists the states of on-chip peripheral modules registers in software standby mode.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 221 of 502 rej09b0239-0400 table 10.3 register states in software standby mode module registers initialized registers retaining data interrupt controller (intc) ? all registers clock pulse generator (cpg) ? all registers user break controller (ubc) ? all registers bus state controller (bsc) ? all registers i/o port ? all registers user debugging interface (h-udi) ? all registers serial communication interface with fifo (scif0 to scif2) ? all registers compare match timer (cmt0 and cmt1) all registers ? host interface (hif) ? all registers the procedure for switching to software standby mode is as follows: 1. clear the tme bit in the timer control register (wtcsr) of the wdt to 0 to stop the wdt. 2. set the timer counter (wtcnt) of the wdt to 0 and bits cks2 to cks0 in wtcsr to appropriate values to secure the specified oscillation settling time. 3. after setting the stby bit in stbcr to 1, execute the sleep instruction. 4. software standby mode is entered and the clocks within this lsi are halted.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 222 of 502 rej09b0239-0400 10.5.2 canceling so ftware standby mode software standby mode is canceled by interrupts (nmi, irq) or a reset. canceling with interrupt: the wdt can be used for hot starts. when an nmi or irq interrupt is detected, the clock will be supplied to the entire lsi and software standby mode will be canceled after the time set in the timer control/status register of the wdt has elapsed. interrupt exception handling is then executed. after the branch to the interrupt handling routine, clear the stby bit in stbcr. wtcnt stops automatically. if the st by bit is not cleared, wtcnt continues operation and a transition is made to software standby mode* when it reaches h'80. this function prevents data destruction due to the voltage rise by an unstable power supply voltage. irq cancels the software standb y mode when the input condition matches the specified detect condition while the irqn1s and irqn0s bits in irqcr are not b'00 (settings other than the low level detection). when the priority level of an irq interrupt is lower than the interrupt mask level set in the status register (sr) of the cpu, the execution of the instruction following the sleep instruction starts again after the cancellation of so ftware standby mode. when the priority level of an irq interrupt is higher than the interrupt mask level set in the status register (sr) of the cpu, irq interrupt exception handling is executed after the cancellation of software standby mode. note: * this software standby mode can be canceled only by a power-on reset. wtcnt value h'ff h'80 time interrupt request wdt overflow and branch to interrupt handling routine crystal oscillator settling time and pll synchronization time clear bit stbcr.stby before wtcnt reaches h'80. when stbcr.stby is cleared, wtcnt halts automatically. figure 10.1 canceling standby mode with stby bit in stbcr
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 223 of 502 rej09b0239-0400 canceling with reset: software standby mode is canceled by a power-on reset. keep the res pin low until the clock oscillation settles. the internal clock will continue to be output to the ckio pin. 10.6 module standby mode 10.6.1 transition to module standby mode setting the mstp bits in the standby control registers (stbcr2 to stbcr4) to 1 halts the supply of clocks to the corresponding on-chip peripheral modules. this function can be used to reduce the power consumption in normal mode. in module standby mode, the states of the external pins of the on-chip peripheral modules change depending on the on-chip peripheral module and port settings. almost all of the registers retains its previous state. 10.6.2 canceling modul e standby function the module standby function can be canceled by clearing the mstp bits in stbcr2 to stbcr4 to 0, or by a power-on reset.
section 10 power-down modes rev. 4.00 sep. 13, 2007 page 224 of 502 rej09b0239-0400
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 225 of 502 rej09b0239-0400 section 11 compare match timer (cmt) this lsi has an on-chip compare match timer (cmt) consisting of a 2-channel 16-bit timer. the cmt has a16-bit counter, and can generate interrupts at set intervals. 11.1 features cmt has the following features. ? selection of four counter input clocks any of four internal clocks (p /8, p /32, p /128, and p /512) can be selected independently for each channel. ? interrupt request on compare match ? when not in use, cmt can be stopped by halting its clock supply to reduce power consumption. figure 11.1 shows a block diagram of cmt. control circuit clock selection cmstr0 cmcsr0 cmcor0 cmcnt0 channel 0 channel 1 cmt p /8 cmcsr1 cmcor1 cmcnt1 p /32 p /128 p /512 p /8 p /32 p /128 p /512 clock selection control circuit comparator comparator [legend] cmstr: compare match timer start register cmcsr: compare match timer control/status register cmcor: compare match timer constant register cmcnt: compare match counter cmi: compare match interrupt module bus bus interface internal bus cmi0 cmi1 figure 11.1 block diagram of compare match timer
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 226 of 502 rej09b0239-0400 11.2 register descriptions the cmt has the following registers. ? compare match timer start register (cmstr) ? compare match timer control/status register_0 (cmcsr_0) ? compare match counter_0 (cmcnt_0) ? compare match constant register_0 (cmcor_0) ? compare match timer star t register_1 (cmstr_1) ? compare match timer control/status register_1 (cmcsr_1) ? compare match counter_1 (cmcnt_1) ? compare match constant register_1 (cmcor_1) 11.2.1 compare match tim er start register (cmstr) cmstr is a 16-bit register that selects whether compare match counter (cmcnt) operates or is stopped. cmstr is initialized to h'0000 by a power-on reset and a transition to standby mode. bit bit name initial value r/w description 15 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 str1 0 r/w count start 1 specifies whether compare match counter 1 operates or is stopped. 0: cmcnt_1 count is stopped 1: cmcnt_1 count is started 0 str0 0 r/w count start 0 specifies whether compare match counter 0 operates or is stopped. 0: cmcnt_0 count is stopped 1: cmcnt_0 count is started
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 227 of 502 rej09b0239-0400 11.2.2 compare match timer co ntrol/status register (cmcsr) cmcsr is a 16-bit register that indicates compar e match generation, enables interrupts and selects the counter input clock. cmcsr is initialized to h'0000 by a power-on reset and a transition to standby mode. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 cmf 0 r/(w) * compare match flag indicates whether or not the values of cmcnt and cmcor match. 0: cmcnt and cmcor values do not match [clearing condition] when 0 is written to this bit 1: cmcnt and cmcor values match 6 cmie 0 r/w compare match interrupt enable enables or disables compare match interrupt (cmi) generation when cmcnt and cmcor values match (cmf=1). 0: compare match interrupt (cmi) disabled 1: compare match interrupt (cmi) enabled 5 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 228 of 502 rej09b0239-0400 bit bit name initial value r/w description 1 0 cks1 cks0 0 0 r/w r/w clock select 1 and 0 select the clock to be input to cmcnt from four internal clocks obtained by dividing the peripheral operating clock (p ). when the str bit in cmstr is set to 1, cmcnt starts counting on the clock selected with bits cks1 and cks0. 00: p /8 01: p /32 10: p /128 11: p /512 note: * only 0 can be written, to clear the flag. 11.2.3 compare matc h counter (cmcnt) cmcnt is a 16-bit register used as an up-counter. when the counter input clock is selected with bits cks1 and cks0 in cmcsr and the str bit in cmstr is set to 1, cmcnt starts counting using the selected clock. when the value in cmcnt and the value in comp are match constant register (cmcor) match, cmcnt is cleared to h'0000 and the cmf flag in cmcsr is set to 1. cmcnt is initialized to h'0000 by a power-on reset and a transition to standby mode. 11.2.4 compare match co nstant register (cmcor) cmcor is a 16-bit register that sets the interval up to a compare match with cmcnt. cmcor is initialized to h'ffff by a power-on reset and is init ialized to h'ffff in standby mode.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 229 of 502 rej09b0239-0400 11.3 operation 11.3.1 interval count operation when an internal clock is selected with bits cks1 and cks0 in cmcsr and the str bit in cmstr is set to 1, cmcnt starts incrementing us ing the selected clock. when the values in cmcnt and cmcor match, cmcnt is cleared to h'0000 and the cmf flag in cmcsr is set to 1. when the cmie bit in cmcsr is set to 1, a compare match interrupt (cmi) is requested. cmcnt then starts counting up again from h'0000. figure 11.2 shows the operatio n of the compare match counter. cmcor1 h'0000 cmcnt1 value time counter cleared by compare match with cmcor1 figure 11.2 counter operation 11.3.2 cmcnt count timing one of four internal clocks (p /8, p /32, p /128, and p /512) obtained by dividing the p clock can be selected with bits cks1 and cks0 in cmcsr. figure 11.3 shows the timing. peripheral operating clock (p ) nth clock (n + 1)th clock count clock cmcnt1 n n + 1 figure 11.3 count timing
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 230 of 502 rej09b0239-0400 11.4 interrupts 11.4.1 interrupt sources the cmt has channels and each of them to which a different v ector address is allocated has compare match interrupt. when both the interrup t request flag (cmf) and interrupt enable bit (cmie) are set to 1, the corresponding interrupt request is output. when the interrupt is used to activate a cpu interrupt, the priority of channe ls can be changed by the interrupt controller settings. for details, see section 6, interrupt controller (intc). 11.4.2 timing of setting compare match flag when cmcor and cmcnt match, a compare match signal is generated and the cmf bit in cmcsr is set to 1. the compare match signal is ge nerated in the last cycle in which the values match (when the cmcnt value is updated to h'0000). that is, after a match between cmcor and cmcnt, the compare match signal is not generated until the next cmcnt counter clock input. figure 11.4 shows the timing of cmf bit setting. n peripheral operating clock (p ) counter clock cmcnt1 cmcor1 compare match signal (n + 1)th clock n 0 figure 11.4 timing of cmf setting 11.4.3 timing of cleari ng compare match flag the cmf bit in cmcsr is cl eared by reading 1 from this bit, then writing 0.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 231 of 502 rej09b0239-0400 11.5 usage notes 11.5.1 conflict between write and co mpare-match processes of cmcnt when the compare match signal is generated in the t2 cycle while wri ting to cmcnt, clearing cmcnt has priority over writing to it. in this case, cmcnt is not written to. figure 11.5 shows the timing to clear the cmcnt counter. peripheral operating clock (p ) address internal write counter clear cmcnt t1 t2 n h'0000 cmcsr write cycle cmcnt figure 11.5 conflict between write and compare-match processes of cmcnt 11.5.2 conflict between word-write and count-up processes of cmcnt even when the count-up occurs in the t2 cycle while writing to cmcnt in words, the writing has priority over the count-up. in this case, the count-up is not performed. figure 11.6 shows the timing to write to cmcnt in words.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 232 of 502 rej09b0239-0400 m cmcnt count-up enable peripheral operating clock (p ) address internal write cmcnt t1 t2 n cmcsr write cycle cmcnt figure 11.6 conflict between word-wri te and count-up processes of cmcnt 11.5.3 conflict between byte-write and count-up processes of cmcnt even when the count-up occurs in the t2 cycle while writing to cmcnt in bytes, the byte-writing has priority over the count-up. in this case, the count-up is not performed. the byte data on another side, which is not written to, is also not counted and the previous contents remain. figure 11.7 shows the timing when the count-up occurs in the t2 cycle while writing to cmcnt in bytes.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 233 of 502 rej09b0239-0400 m xx cmcnth cmcnt count-up enable cmcnth cmcntl peripheral operating clock (p ) address internal write t1 t2 n cmcsr write cycle figure 11.7 conflict between byte-w rite and count-up processes of cmcnt 11.5.4 conflict between write processes to cmcnt with the co unting stopped and cmcor writing the same value to cmcnt with the counting stopped and cmcor is prohibited. if written, the cmf flag in cmcsr is set to 1 and cmcnt is cleared to h'0000.
section 11 compare match timer (cmt) rev. 4.00 sep. 13, 2007 page 234 of 502 rej09b0239-0400
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 235 of 502 rej09b0239-0400 section 12 serial communi cation interface with fifo (scif) 12.1 overview this lsi has a three-channel serial communication interface with fifo (scif) that supports both asynchronous and clock synchronous serial communi cation. it also has 16-stage fifo registers for both transmission and reception independently for each channel that enable this lsi to perform efficient high-speed co ntinuous communication. 12.1.1 features ? asynchronous serial communication: ? serial data communication is performed by st art-stop in character units. the scif can communicate with a un iversal asynchronous receiver/tran smitter (uart), an asynchronous communication interface adapter (acia), or any other communications chip that employs a standard asynchronous seri al system. there are eight selectable serial data communication formats. ? data length: 7 or 8 bits ? stop bit length: 1 or 2 bits ? parity: even, odd, or none ? receive error detection: parity , framing, and overrun errors ? break detection: break is detected when a framin g error is followed by at least one frame at the space 0 level (low level). it is also detect ed by reading the rxd level directly from the port data register when a framing error occurs. ? synchronous mode: ? serial data communication is synchronized w ith a clock signal. the scif can communicate with other chips having a synchronous communication function. there is one serial data communication format. ? data length: 8 bits ? receive error detecti on: overrun errors ? full duplex communication: the transmitting and receiving sections are independent, so the scif can transmit and receive simultaneously. bo th sections use 16-stage fifo buffering, so high-speed continuous data transfer is possible in both the transmit and receive directions.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 236 of 502 rej09b0239-0400 ? on-chip baud rate generator with selectable bit rates ? internal or external tran smit/receive clock source: from either baud rate generator (internal) or sck pin (external) ? four types of interrupts: tr ansmit-fifo-data-empty, break , receive-fifo-data-full, and receive-error interrupts are requested independently. ? when the scif is not in use, it can be stopped by halting the clock supplied to it, saving power. ? in asynchronous, on-chip modem control functions ( rts and cts ) (only for channel 1 and channel 0). ? the number of data in the tran smit and receive fifo registers an d the number of receive errors of the receive data in the receive fifo register can be ascertained. ? a time-out error (dr) can be detected when receiving in asynchronous mode. figure 12.1 shows a block diagram of the scif for each channel.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 237 of 502 rej09b0239-0400 module data bus scfrdr (16 stage) scrsr rxd txd sck cts rts scftdr (16 stage) sctsr scsmr sclsr scfdr scfcr scfsr scbrrn parity generation parity check transmission/ reception control baud rate generator clock external clock p p /4 p /16 p /64 txi rxi eri bri scif bus interface internal data bus scscr scsptr scrsr: scfrdr: sctsr: scftdr: scsmr: scscr: [legend] scfsr: scbrr: scsptr: scfcr: scfdr: sclsr: receive shift register receive fifo data register transmit shift register transmit fifo data register serial mode register serial control register serial status register bit rate register serial port register fifo control register fifo data count register line status register figure 12.1 block diagram of scif
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 238 of 502 rej09b0239-0400 12.2 pin configuration the scif has the serial pins summarized in table 12.1. table 12.1 scif pins channel pin name a bbreviation i/o function 0 serial clock pin sck0 i/o clock i/o receive data pin rxd0 input receive data input transmit data pin txd0 output transmit data output request to send pin rts0 i/o request to send clear to send pin cts0 i/o clear to send 1 serial clock pin sck1 i/o clock i/o receive data pin rxd1 input receive data input transmit data pin txd1 ou tput transmit data output request to send rts1 output request to send clear to send pin cts1 input clear to send 2 serial clock pin sck2 i/o clock i/o receive data pin rxd2 input receive data input transmit data pin txd2 ou tput transmit data output
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 239 of 502 rej09b0239-0400 12.3 register description the scif has the following regist ers. these registers specify the data format and bit rate, and control the transmitter and receiver sections. ? receive fifo data re gister_0 (scfrdr_0) ? transmit fifo data register_0 (scftdr_0) ? serial mode register_0 (scsmr_0) ? serial control register_0 (scscr_0) ? serial status regi ster_0 (scfsr_0) ? bit rate register_0 (scbrr_0) ? fifo control register_0 (scfcr_0) ? fifo data count register_0 (scfdr_0) ? serial port register_0 (scsptr_0) ? line status register_0 (sclsr_0) ? receive fifo data re gister_1 (scfrdr_1) ? transmit fifo data register_1 (scftdr_1) ? serial mode register_1 (scsmr_1) ? serial control register_1 (scscr_1) ? serial status regi ster_1 (scfsr_1) ? bit rate register_1 (scbrr_1) ? fifo control register_1 (scfcr_1) ? fifo data count register_1 (scfdr_1) ? serial port register_1 (scsptr_1) ? line status register_1 (sclsr_1) ? receive fifo data re gister_2 (scfrdr_2) ? transmit fifo data register_2 (scftdr_2) ? serial mode register_2 (scsmr_2) ? serial control register_2 (scscr_2) ? serial status regi ster_2 (scfsr_2) ? bit rate register_2 (scbrr_2) ? fifo control register_2 (scfcr_2) ? fifo data count register_2 (scfdr_2) ? serial port register_2 (scsptr_2) ? line status register_2 (sclsr_2)
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 240 of 502 rej09b0239-0400 12.3.1 receive shift register (scrsr) scrsr receives serial data. data input at the rxd pin is loaded into scrsr in the order received, lsb (bit 0) first, converting the data to parallel form. when one byte has been received, it is automatically transferred to scfrdr, the receive fifo data register. the cpu cannot read or write to scrsr directly. 12.3.2 receive fifo da ta register (scfrdr) scfrdr is a 16-stage 8-bit fifo register that stores serial recei ve data. the scif completes the reception of one byte of serial da ta by moving the received data from the receive shift register (scrsr) into scfrdr for storage. continuous reception is possible until 16 bytes are stored. the cpu can read but not write to scfrdr. if data is read when there is no receive data in the scfrdr, the value is undefined. when this register is full of recei ve data, subsequent serial data is lost. scfrdr is initialized to undefined value by a power-on reset. bit bit name initial value r/w description 7 to 0 ? undefined r fifo for transmits serial data 12.3.3 transmit shift register (sctsr) sctsr transmits serial data. the scif loads transm it data from the transmit fifo data register (scftdr) into sctsr, then transmits the data seri ally from the txd pin, lsb (bit 0) first. after transmitting one data byte, the scif automatically loads the next transmit data from scftdr into sctsr and starts transmitting again. the cpu cannot read or write to sctsr directly.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 241 of 502 rej09b0239-0400 12.3.4 transmit fifo data register (scftdr) scftdr is a 16-stage 8-bit fifo register that stores data for serial transmission. when the scif detects that the transmit shift register (sctsr) is empty, it moves transmit data written in the scftdr into sctsr and starts serial transmissi on. continuous serial transmission is performed until there is no transmit data left in scftdr. scftdr can always be written to by the cpu. when scftdr is full of transmit data (16 bytes), no more data can be written. if writing of new data is attempted, the data is ignored. scftdr is initialized to undefined value by a power-on reset. bit bit name initial value r/w description 7 to 0 ? undefined w fifo for transmits serial data 12.3.5 serial mode register (scsmr) scsmr is a 16-bit register that specifies the sc if serial commun ication format and selects the clock source for the baud rate generator. the cpu can always read and write to scsmr. scsmr is initialized to h'0000 by a power-on reset. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 c/ a 0 r/w communication mode selects whether the scif oper ates in asynchronous or synchronous mode. 0: asynchronous mode 1: synchronous mode
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 242 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 chr 0 r/w character length selects 7-bit or 8-bit data in asynchronous mode. in the synchronous mode, the data length is always eight bits, regardless of the chr setting. 0: 8-bit data 1: 7-bit data * note: * when 7-bit data is selected, the msb (bit 7) of the transmit fifo data register is not transmitte d 5 pe 0 r/w parity enable selects whether to add a parity bit to transmit data and to check the parity of receive data, in asynchronous mode. in synchronous mode, a parity bit is neither added nor checked, regardless of the pe setting. 0: parity bit not added or checked 1: parity bit added and checked * note: * when pe is set to 1, an even or odd parity bit is added to transmit data, depending on the parity mode (o/ e ) setting. receive data parity is checked according to the even/odd (o/ e ) mode setting.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 243 of 502 rej09b0239-0400 bit bit name initial value r/w description 4 o/ e 0 r/w parity mode selects even or odd parity when parity bits are added and checked. the o/ e setting is used only in asynchronous mode and only when the parity enable bit (pe) is set to 1 to enable parity addition and checking. the o/ e setting is ignored in synchronous mode, or in asynchronous mode when parity addition and checking is disabled. 0: even parity * 1 1: odd parity * 2 notes: 1. if even parity is selected, the parity bit is added to transmit data to make an even number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an even number of 1s in the received character and parity bit combined. 2. if odd parity is selected, the parity bit is added to transmit data to make an odd number of 1s in the transmitted character and parity bit combined. receive data is checked to see if it has an odd number of 1s in the received character and parity bit combined.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 244 of 502 rej09b0239-0400 bit bit name initial value r/w description 3 stop 0 r/w stop bit length selects one or two bits as the stop bit length in asynchronous mode. this setting is used only in asynchronous mode. it is ignored in synchronous mode because no stop bits are added. when receiving, only the first stop bit is checked, regardless of the stop bit setting. if the second stop bit is 1, it is treated as a stop bit, but if the second stop bit is 0, it is treated as the start bit of the next incoming character. 0: one stop bit when transmitting, a single 1-bit is added at the end of each transmitted character. 1: two stop bits when transmitting, two 1 bits are added at the end of each transmitted character. 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1 0 cks1 cks0 0 0 r/w r/w clock select 1 and 0 select the internal clock source of the on-chip baud rate generator. four clock sources are available. p , p /4, p /16 and p /64. for further information on the clock source, bit rate register settings, and baud rate, see section 12.3.8, bit ra te register (scbrr). 00: p 01: p /4 10: p /16 11: p /64 note: p : peripheral clock
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 245 of 502 rej09b0239-0400 12.3.6 serial control register (scscr) scscr is a 16-bit register that operates the scif transmitter/receiver, enab les/disables interrupt requests, and selects the transmit/receive clock so urce. the cpu can always read and write to scscr. scscr is initialized to h'0000 by a power-on reset. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 tie 0 r/w transmit interrupt enable enables or disables the transmit-fifo-data-empty interrupt (txi). serial transmit data in the transmit fifo data register (scftdr) is send to the transmit shift register (sctsr). then, the tdfe flag in the serial status register (scfsr) is set to1 when the number of data in scftdr becomes less than the number of transmission triggers. at this time, a txi is requested. 0: transmit-fifo-data-empty interrupt request (txi) is disabled * 1: transmit-fifo-data-empty interrupt request (txi) is enabled note: * the txi interrupt request can be cleared by writing a greater number of transmit data than the specified transmission trigger number to scftdr and by clearing the tdfe bit to 0 after reading 1 from the tdfe bit, or can be cleared by clearing this bit to 0.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 246 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 rie 0 r/w receive interrupt enable enables or disables the receive-data-full (rxi) interrupts requested when the rdf flag or dr flag in serial status register (scfsr ) is set to1, receive-error (eri) interrupts requested when the er flag in scfsr is set to1, and break (bri) interrupts requested when the brk flag in scfsr or the orer flag in line status register (sclsr) is set to1. 0: receive-data-full interrupt (rxi), receive-error interrupt (eri), and break interrupt (bri) requests are disabled * 1: receive-data-full interrupt (rxi), receive-error interrupt (eri), and break interrupt (bri) requests are enabled note: * rxi interrupt requests can be cleared by reading the dr or rdf flag after it has been set to 1, then clearing the flag to 0, or by clearing rie to 0. eri or bri interrupt requests can be cleared by reading the er, br or orer flag after it has been set to 1, then clearing the flag to 0, or by clearing rie and reie to 0. 5 te 0 r/w transmit enable enables or disables the scif serial transmitter. 0: transmitter disabled 1: transmitter enabled * note: * serial transmission starts after writing of transmit data into scftdr. select the transmit format in scsmr and scfcr and reset the transmit fifo before setting te to 1.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 247 of 502 rej09b0239-0400 bit bit name initial value r/w description 4 re 0 r/w receive enable enables or disables the scif serial receiver. 0:receiver disabled * 1 1: receiver enabled * 2 notes: 1. clearing re to 0 does not affect the receive flags (dr, er, brk, rdf, fer, per, and orer). these flags retain their previous values. 2. serial reception starts when a start bit is detected in asynchronous mode, or synchronous clock input is detected in synchronous mode. select the receive format in scsmr and scfcr and reset the receive fifo before setting re to 1. 3 reie 0 r receive error interrupt enable enables or disables the receive-error (eri) interrupts and break (bri) interrupts. the setting of reie bit is valid only when rie bit is set to 0. 0: receive-error interrupt (eri) and break interrupt (bri) requests are disabled * 1: receive-error interrupt (eri) and break interrupt (bri) requests are enabled note: * eri or bri interrupt requests can be cleared by reading the er, br or orer flag after it has been set to 1, then clearing the flag to 0, or by clearing rie and reie to 0. even if rie is set to 0, when reie is set to 1, eri or bri interrupt requests are enabled.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 248 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 1 0 cke1 cke0 0 0 r/w r/w clock enable 1 and 0 select the scif clock source and enable or disable clock output from the sck pin. depending on the combination of cke1 and cke0, the sck pin can be used for serial clock output or serial clock input. the cke0 setting is valid only when the scif is operating on the internal clock (cke1 = 0). the cke0 setting is ignored when an external clock source is selected (cke1 = 1). in synchronous mode, select the scif operating mode in the serial mode register (scsmr), then set cke1 and cke0. ? asynchronous mode 00: internal clock, sck pin used for input pin (the input signal is ignored. the stat e of the sck pin depends on both the sckio and sckdt bits.) 01: internal clock, sck pin used for clock output ( the output clock frequency is 16 times the bit rate. ) 10: external clock, sck pin used for clock input (the input clock frequency is 16 times the bit rate.) 11: setting prohibited ? synchronous mode 00: internal clock, sck pin used for serial clock output 01: internal clock, sck pin used for serial clock output 10: external clock, sck pin used for serial clock input 11: setting prohibited
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 249 of 502 rej09b0239-0400 12.3.7 serial status register (scfsr) scfsr is a 16-bit register. the upper 8 bits indi cate the number of receives errors in the scfrdr data, and the lower 8 bits indicate the status flag indicating scif operating state. the cpu can always read and write to scfsr, but cannot write 1 to the st atus flags (er, tend, tdfe, brk, rdf, and dr). these fl ags can be cleared to 0 only if they have first been read (after being set to 1). bits 3 (fer) and 2 (per) are read-only bits that cannot be written. scfsr is initialized to h'0060 by a power-on reset. bit bit name initial value r/w description 15 14 13 12 per3 per2 per1 per0 0 0 0 0 r r r r number of parity errors indicate the number of data including a parity error in the receive data stored in the receive fifo data register (scfrdr). the value indicated by bits 15 to 12 represents the number of parity errors in scfrdr. when parity errors have occurred in all 16-byte receive data in scfrdr, per3 to per0 show 0. 11 10 9 8 fer3 fer2 fer1 fer0 0 0 0 0 r r r r number of framing errors indicate the number of data including a framing error in the receive data stored in scfrdr. the value indicated by bits 11 to 8 represents the number of framing errors in scfrdr. when framing errors have occurred in all 16-byte receive data in scfrdr, fer3 to fer0 show 0.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 250 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 er 0 r/(w) * receive error indicates the occurrence of a framing error, or of a parity error when receiving data that includes parity. * 1 0: receiving is in progress or has ended normally [clearing conditions] ? er is cleared to 0 a power-on reset ? er is cleared to 0 when the chip is when 0 is written after 1 is read from er 1: a framing error or parity error has occurred. [setting conditions] ? er is set to 1 when the stop bit is 0 after checking whether or not the last stop bit of the received data is 1 at the end of one data receive operation * 2 ? er is set to 1 when the total number of 1s in the receive data plus parity bit does not match the even/odd parity specified by the o/ e bit in scsmr notes: 1. clearing the re bit to 0 in scscr does not affect the er bit, which retains its previous value. even if a receive error occurs, the receive data is transferred to scfrdr and the receive operation is continued. whether or not the data read from scrdr includes a receive error can be detected by the fer and per bits in scfsr. 2. in two stop bits mode, only the first stop bit is checked; the second stop bit is not checked.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 251 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 tend 1 r/(w) * transmit end indicates that when the last bit of a serial character was transmitted, scftdr did not contain valid data, so transmission has ended. 0: transmission is in progress [clearing condition] tend is cleared to 0 when 0 is written after 1 is read from tend after transmit data is written in scftdr 1: end of transmission [setting conditions] ? tend is set to 1 when the chip is a power-on reset ? tend is set to 1 when te is cleared to 0 in the serial control register (scscr) ? tend is set to 1 when scftdr does not contain receive data when the last bit of a one-byte serial character is transmitted
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 252 of 502 rej09b0239-0400 bit bit name initial value r/w description 5 tdfe 1 r/(w) * transmit fifo data empty indicates that data has been transferred from the transmit fifo data register (scftdr) to the transmit shift register (sctsr), the number of data in scftdr has become less than the transmission trigger number specified by the ttrg1 and ttrg0 bits in the fifo control register (scfcr), and writing of transmit data to scftdr is enabled. 0: the number of transmit data written to scftdr is greater than the specified transmission trigger number [clearing conditions] ? tdfe is cleared to 0 when data exceeding the specified transmission trigger number is written to scftdr after 1 is read from the tdfe bit and then 0 is written ? tdfe is cleared to 0 when dmac write data exceeding the specified transmission trigger number to scftdr 1: the number of transmit data in scftdr is equal to or less than the specified transmission trigger number * [setting conditions] ? tdfe is set to 1 by a power-on reset ? tdfe is set to 1 when the number of transmit data in scftdr becomes equal to or less than the specified transmission trigger number as a result of transmission note: * since scftdr is a 16-byte fifo register, the maximum number of data that can be written when tdfe is 1 is "16 minus the specified transmission trigger number". if an attempt is made to write additional data, the data is ignored. the number of data in scftdr is indicated by the upper 8 bits of scfdr.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 253 of 502 rej09b0239-0400 bit bit name initial value r/w description 4 brk 0 r/(w) * break detection indicates that a break signal has been detected in receive data. 0: no break signal received [clearing conditions] ? brk is cleared to 0 when the chip is a power-on reset ? brk is cleared to 0 when software reads brk after it has been set to 1, then writes 0 to brk 1: break signal received * [setting condition] brk is set to 1 when data including a framing error is received, and a framing error occurs with space 0 in the subsequent receive data note: * when a break is detected, transfer of the receive data (h'00) to scfrdr stops after detection. when the break ends and the receive signal becomes mark 1, the transfer of receive data resumes. 3 fer 0 r framing error indicates a framing error in the data read from the next receive fifo data register (scfrdr) in asynchronous mode. 0: no receive framing error occurred in the next data read from scfrdr [clearing conditions] ? fer is cleared to 0 when the chip undergoes a power-on reset ? fer is cleared to 0 when no framing error is present in the next data read from scfrdr 1: a receive framing error occurred in the next data read from scfrdr. [setting condition] fer is set to 1 when a framing error is present in the next data read from scfrdr
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 254 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 per 0 r parity error indicates a parity error in the data read from the next receive fifo data register (scfrdr) in asynchronous mode. 0: no receive parity error occurred in the next data read from scfrdr [clearing conditions] ? per is cleared to 0 when the chip undergoes a power-on reset ? per is cleared to 0 when no parity error is present in the next data read from scfrdr 1: a receive parity error occurred in the data read from scfrdr [setting condition] per is set to 1 when a parity error is present in the next data read from scfrdr
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 255 of 502 rej09b0239-0400 bit bit name initial value r/w description 1 rdf 0 r/(w) * receive fifo data full indicates that receive data has been transferred to the receive fifo data r egister (scfrdr), and the number of data in scfrdr has become more than the receive trigger number specified by the rtrg1 and rtrg0 bits in the fi fo control register (scfcr). 0: the number of transmit data written to scfrdr is less than the specified receive trigger number [clearing conditions] ? rdf is cleared to 0 by a power-on reset ? rdf is cleared to 0 when the scfrdr is read until the number of receive data in scfrdr becomes less than the specified receive trigger number after 1 is read from rdf and then 0 is written 1: the number of receive data in scfrdr is more than the specified receive trigger number [setting condition] rdf is set to 1 when a number of receive data more than the specified receive tr igger number is stored in scfrdr * note: * scftdr is a 16-byte fifo register. when rdf is 1, the specified receive trigger number of data can be read at the maximum. if an attempt is made to read after all the data in scfrdr has been read, the data is undefined. the number of receive data in scfrdr is indicated by the lower 8 bits of scfdr.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 256 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 dr 0 r/(w) * receive data ready indicates that the number of data in the receive fifo data register (scfrdr) is less than the specified receive trigger number, and that the next data has not yet been received after the elapse of 15 etu from the last stop bit in asynchronous mode. in clock synchronous mode, this bit is not set to 1. 0: receiving is in progress, or no receive data remains in scfrdr after receiving ended normally [clearing conditions] ? dr is cleared to 0 when the chip undergoes a power-on reset ? dr is cleared to 0 when all receive data are read after 1 is read from dr and then 0 is written 1: next receive data has not been received [setting condition] dr is set to 1 when scfrdr contains less data than the specified receive trigger number, and the next data has not yet been received after the elapse of 15 etu from the last stop bit. * note: * this is equivalent to 1.5 frames with the 8-bit, 1-stop-bit format. (etu: elementary time unit) note: * the only value that can be writ ten is 0 to clear the flag.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 257 of 502 rej09b0239-0400 12.3.8 bit rate register (scbrr) scbrr is an 8-bit register that, together with the baud rate generator clock source selected by the cks1 and cks0 bits in the serial mode register (scsmr), determines the serial transmit/receive bit rate. the cpu can always read and write to scbrr. s cbrr is initialized to h'ff by a power-on reset. each channel has independent baud rate generator control, so different values can be set in three channels. the scbrr setting is calculated as follows: ? asynchronous mode: n = 10 6 - 1 64 2 2n-1 b p ? synchronous mode: n = 10 6 - 1 8 2 2n-1 b p b: bit rate (bits/s) n: scbrr setting for baud rate generator (0 n 255) (the setting value should satisfy the electrical characteristics.) p : operating frequency for peripheral modules (mhz) n: baud rate generator clock source (n = 0, 1, 2, 3) (for the clock sources and values of n, see table 12.2.)
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 258 of 502 rej09b0239-0400 table 12.2 scsmr settings scsmr settings n clock source cks1 cks0 0 p 0 0 1 p /4 0 1 2 p /16 1 0 3 p /64 1 1 note: the bit rate error in asynchro nous is given by the following formula: error (%) = - 1 100 (n + 1) b 64 2n-1 2 p 10 6 table 12.3 lists examples of scbrr settings in as ynchronous mode, and table 12.4 lists examples of scbrr settings in synchronous mode. table 12.3 bit rates and scbrr settings in asynchronous mode p (mhz) 5 6 6.144 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) 110 2 88 ?0.25 2 106 ?0.44 2 108 0.08 150 2 64 0.16 2 77 0.16 2 79 0.00 300 1 129 0.16 1 155 0.16 1 159 0.00 600 1 64 0.16 1 77 0.16 1 79 0.00 1200 0 129 0.16 0 155 0.16 0 159 0.00 2400 0 64 0.16 0 77 0.16 0 79 0.00 4800 0 32 ?1.36 0 38 0.16 0 39 0.00 9600 0 15 1.73 0 19 ?2.34 0 19 0.00 19200 0 7 1.73 0 9 ?2.34 0 9 0.00 31250 0 4 0.00 0 5 0.00 0 5 2.40 38400 0 3 1.73 0 4 ?2.34 0 4 0.00
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 259 of 502 rej09b0239-0400 p (mhz) 7.3728 8 9.8304 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) 110 2 130 ?0.07 2 141 0.03 2 174 ?0.26 150 2 95 0.00 2 103 0.16 2 127 0.00 300 1 191 0.00 1 207 0.16 1 255 0.00 600 1 95 0.00 1 103 0.16 1 127 0.00 1200 0 191 0.00 0 207 0.16 0 255 0.00 2400 0 95 0.00 0 103 0.16 0 127 0.00 4800 0 47 0.00 0 51 0.16 0 63 0.00 9600 0 23 0.00 0 25 0.16 0 31 0.00 19200 0 11 0.00 0 12 0.16 0 15 0.00 31250 0 6 5.33 0 7 0.00 0 9 ?1.70 38400 0 5 0.00 0 6 ?6.99 0 7 0.00 p (mhz) 10 12 12.288 14.7456 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 2 177 ?0.25 2 212 0.03 2 217 0.08 3 64 0.70 150 2 129 0.16 2 155 0.16 2 159 0.00 2 191 0.00 300 2 64 0.16 2 77 0.16 2 79 0.00 2 95 0.00 600 1 129 0.16 1 155 0.16 1 159 0.00 1 191 0.00 1200 1 64 0.16 1 77 0.16 1 79 0.00 1 95 0.00 2400 0 129 0.16 0 155 0.16 0 159 0.00 0 191 0.00 4800 0 64 0.16 0 77 0.16 0 79 0.00 0 95 0.00 9600 0 32 ?1.36 0 38 0.16 0 39 0.00 0 47 0.00 19200 0 15 1.73 0 19 0.16 0 19 0.00 0 23 0.00 31250 0 9 0.00 0 11 0.00 0 11 2.40 0 14 ?1.70 38400 0 7 1.73 0 9 ?2.34 0 9 0.00 0 11 0.00
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 260 of 502 rej09b0239-0400 p (mhz) 16 19.6608 20 24 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 70 0.03 3 86 0.31 3 88 ?0.25 3 106 ?0.44 150 2 207 0.16 2 255 0.00 3 64 0.16 3 77 0.16 300 2 103 0.16 2 127 0.00 2 129 0.16 2 155 0.16 600 1 207 0.16 1 255 0.00 2 64 0.16 2 77 0.16 1200 1 103 0.16 1 127 0.00 1 129 0.16 1 155 0.16 2400 0 207 0.16 0 255 0.00 1 64 0.16 1 77 0.16 4800 0 103 0.16 0 127 0.00 0 129 0.16 0 155 0.16 9600 0 51 0.16 0 63 0.00 0 64 0.16 0 77 0.16 19200 0 25 0.16 0 31 0.00 0 32 ?1.36 0 38 0.16 31250 0 15 0.00 0 19 ?1.70 0 19 0.00 0 23 0.00 38400 0 12 0.16 0 15 0.00 0 15 1.73 0 19 ?2.34 p (mhz) 24.576 28.7 30 33 bit rate (bits/s) n n error ( % ) n n error ( % ) n n error ( % ) n n error ( % ) 110 3 108 0.08 3 126 0.31 3 132 0.13 3 145 0.33 150 3 79 0.00 3 92 0.46 3 97 ?0.35 3 106 0.39 300 2 159 0.00 2 186 ?0.08 2 194 0.16 2 214 -0.07 600 2 79 0.00 2 92 0.46 2 97 ?0.35 2 106 0.39 1200 1 159 0.00 1 186 ?0.08 1 194 0.16 1 214 -0.07 2400 1 79 0.00 1 92 0.46 1 97 ?0.35 1 106 0.39 4800 0 159 0.00 0 186 ?0.08 0 194 ?1.36 0 214 -0.07 9600 0 79 0.00 0 92 0.46 0 97 ?0.35 0 106 0.39 19200 0 39 0.00 0 46 ?0.61 0 48 ?0.35 0 53 -0.54 31250 0 24 ?1.70 0 28 ?1.03 0 29 0.00 0 32 0.00 38400 0 19 0.00 0 22 1.55 0 23 1.73 0 26 -0.54 note: settings with an error of 1% or less are recommended.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 261 of 502 rej09b0239-0400 table 12.4 bit rates and scbrr settings in synchronous mode p (mhz) 5 8 16 28.7 30 33 bit rate (bits/s) n n n n n n n n n n n n 110 ? ? ? ? ? ? ? ? ? ? ? ? 250 3 77 3 124 3 249 ? ? ? ? ? ? 500 3 38 2 249 3 124 3 223 3 233 3 255 1k 2 77 2 124 2 249 3 111 3 116 3 125 2.5k 1 124 1 199 2 99 2 178 2 187 2 200 5k 0 249 1 99 1 199 2 89 2 93 2 100 10k 0 124 0 199 1 99 1 178 1 187 1 200 25k 0 49 0 79 0 159 1 71 1 74 1 80 50k 0 24 0 39 0 79 0 143 0 149 0 160 100k ? ? 0 19 0 39 0 71 0 74 0 80 250k 0 4 0 7 0 15 ? ? 0 29 0 31 500k ? ? 0 3 0 7 ? ? 0 14 0 15 1m ? ? 0 1 0 3 ? ? ? ? 0 7 2m 0 0 * 0 1 ? ? ? ? ? ? [legend] blank: no setting possible ? : setting possible, but error occurs * : continuous transmission/reception is disabled. note: settings with an error of 1% or less are recommended.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 262 of 502 rej09b0239-0400 table 12.5 indicates the maximum bit rates in asynchronous mode when the baud rate generator is used. tables 12.6 and 12.7 list the maximum rates for external clock input. table 12.5 maximum bit rates for variou s frequencies with baud rate generator (asynchronous mode) settings p (mhz) maximum bit rate (bits/s) n n 5 156250 0 0 4.9152 153600 0 0 8 250000 0 0 9.8304 307200 0 0 12 375000 0 0 14.7456 460800 0 0 16 500000 0 0 19.6608 614400 0 0 20 625000 0 0 24 750000 0 0 24.576 768000 0 0 28.7 896875 0 0 30 937500 0 0 33 1031250 0 0
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 263 of 502 rej09b0239-0400 table 12.6 maximum bit rates with external clock input (asynchronous mode) p (mhz) external input clock (mh z) maximum bit rate (bits/s) 5 1.2500 78125 4.9152 1.2288 76800 8 2.0000 125000 9.8304 2.4576 153600 12 3.0000 187500 14.7456 3.6864 230400 16 4.0000 250000 19.6608 4.9152 307200 20 5.0000 312500 24 6.0000 375000 24.576 6.1440 384000 28.7 7.1750 448436 30 7.5000 468750 33 8.25 515625 table 12.7 maximum bit rates with exte rnal clock input (synchronous mode) p (mhz) external input clock (mh z) maximum bit rate (bits/s) 5 0.8333 833333.3 8 1.3333 1333333.3 16 2.6667 2666666.7 24 4.0000 4000000.0 28.7 4.7833 4783333.3 30 5.0000 5000000.0 33 5.5000 5500000.0 12.3.9 fifo control register (scfcr) scfcr is a 16-bit register that resets the numbe r of data in the transmit and receive fifo registers, sets the trigger data number, and contains an enable bit for loop-back testing. scfcr can always be read and written to by the cpu. it is initialized to h'0000 by a power-on reset.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 264 of 502 rej09b0239-0400 bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 9 8 rstrg2 rstrg1 rstrg0 0 0 0 r/w r/w r/w rts output active trigger when the number of receive data in the receive fifo register (scfrdr) becomes more than the number shown below, the rts signal is set to high. these bits are available only in scfcr_0 and scfcr_1. in scfcr_2, thes e bits are reserved. the initial value is 0 and the write value should always be 0. 000: 15 001: 1 010: 4 011: 6 100: 8 101: 10 110: 12 111: 14 7 6 rtrg1 rtrg0 0 0 r/w r/w receive fifo data trigger set the specified receive trigger number. the receive data full (rdf) flag in the seri al status register (scfsr) is set when the number of receive data stored in the receive fifo register (scf rdr) exceeds the specified trigger number shown below. ? asynchronous mode 00: 1 01: 4 10: 8 11: 14 ? synchronous mode 00: 1 01: 2 10: 8 11: 14
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 265 of 502 rej09b0239-0400 bit bit name initial value r/w description 5 4 ttrg1 ttrg0 0 0 r/w r/w transmit fifo data trigger 1 and 0 set the specified transmit trigger number. the transmit fifo data register empty (t dfe) flag in the serial status register (scfsr) is set when the number of transmit data in the transmit fifo data register (scftdr) becomes less than the specified trigger number shown below. 00: 8 (8) * 01: 4 (12) * 10: 2 (14) * 11: 0 (16) * note: * values in parentheses mean the number of remaining bytes in scftdr when the tdfe flag is set to 1. 3 mce 0 r/w modem control enable enables modem control signals cts and rts . in synchronous mode, clear this bit to 0. this bit is available only in scfcr_0 and scfcr_1. in scfcr_2, this bit is reserved. the initial value is 0 and the write value should always be 0. 0: modem signal disabled * 1: modem signal enabled note: * the cts signal is fixed active 0 regardless of the input value, and the rts signal is also fixed 0. 2 tfrst 0 r/w transmit fifo data register reset disables the transmit data in the transmit fifo data register and resets the data to the empty state. 0: reset operation disabled * 1: reset operation enabled note: * reset operation is executed by a power-on reset.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 266 of 502 rej09b0239-0400 bit bit name initial value r/w description 1 rfrst 0 r/w receive fifo data register reset disables the receive data in the receive fifo data register and resets the data to the empty state. 0: reset operation disabled * 1: reset operation enabled note: * reset operation is executed by a power-on reset. 0 loop 0 r/w loop-back test internally connects the transmit output pin (txd) and receive input pin (rxd) and enables loop-back testing. 0: loop back test disabled 1: loop back test enabled
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 267 of 502 rej09b0239-0400 12.3.10 fifo data count register (scfdr) scfdr is a 16-bit register which indicates the number of data stor ed in the transmit fifo data register (scftdr) and the receive fifo data register (scfrdr). it indicates the number of transmit data in scftdr with the upper eight bits, and the number of receive data in scfrdr with the lower eight bits. scfdr can always be read from by the cpu. scfdr is initialized to h'0000 by a power on reset. bit bit name initial value r/w description 15 to 13 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 12 11 10 9 8 t4 t3 t2 t1 t0 0 0 0 0 0 r r r r r indicate the number of non-transmitted data stored in scftdr. h'00 means no tr ansmit data, and h'10 means that scftdr is full of transmit data. 7 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 3 2 1 0 r4 r3 r2 r1 r0 0 0 0 0 0 r r r r r indicate the number of re ceive data stored in scfrdr. h'00 means no receive data, and h'10 means that scfrdr full of receive data.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 268 of 502 rej09b0239-0400 12.3.11 serial port register (scsptr) scsptr is a 16-bit register that controls input/output and data for the pins multiplexed to the scif function. bits 7 and 6 can control the rts pin, bits 5 and 4 can control the cts pin, and bits 3 and 2 can control the sck pin. bits 1 and 0 can be used to read the input data from the rxd pin and to output data to the txd pin, so they co ntrol break of serial tr ansfer. in addition to descriptions of individual bits shown below, see section 12.6, serial port register (scsptr) and scif pins. scsptr can always be read from or written to by the cpu. bits 7, 5, 3, and 1 in scsptr are initialized by a power-on reset. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 rtsio 0 r/w rts port input/output control controls the rts pin in combination with the rtsdt bit in this register and the mce bit in scfcr. this bit is reserved in scptr_2 of scif channel 2 since scif channel 2 does not support the flow control. 6 rtsdt ? * r/w rts port data controls the rts pin in combination with the rtsio bit in this register and the mce bit in scfcr. select the rts pin function in the pfc (pin function controller) beforehand. mce rtsio rtsdt: rts pin state 0 0 : input (initial state) 0 1 0: low level output 0 1 1: high level output 1 : sequence output according to modem control logic : don't care the rts pin state is read from this bit instead of the set value. this bit is reserved in scptr_2 of scif channel 2 since scif channel 2 does not support the flow control.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 269 of 502 rej09b0239-0400 bit bit name initial value r/w description 5 ctsio 0 r/w cts port input/output control controls the cts pin in combination with the ctsdt bit in this register and the mce bit in scfcr. this bit is reserved in scptr_2 of scif channel 2 since scif channel 2 does not support the flow control. 4 ctsdt ? * r/w cts port data controls the cts pin in combination with the ctsio bit in this register and the mce bit in scfcr. select the cts pin function in the pfc (pin function controller) beforehand. mce ctsio ctsdt: cts pin state 0 0 : input (initial state) 0 1 0: low level output 0 1 1: high level output 1 : input to modem control logic : don't care the cts pin state is read from this bit instead of the set value. this bit is reserved in scptr_2 of scif channel 2 since scif channel 2 does not support the flow control. 3 sckio 0 r/w sck port input/output control controls the sck pin in combination with the sckdt bit in this register, the c/a bit in scsmr, and bits cke1 and cke0 in scscr.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 270 of 502 rej09b0239-0400 bit bit name initial value r/w description 2 sckdt ? * r/w sck port data controls the sck pin in combination with the sckio bit in this register, the c/ a bit in scsmr, and bits cke1 and cke0 in scscr. select the sck pin function in the pfc (pin function controller) beforehand. c/ a cke1 cke0 sckio sckdt: sck pin state 0 0 0 0 : input (initial state) 0 0 0 0 0: low level output 0 0 0 1 1: high level output 0 0 1 : internal clock output according to serial core logic 0 1 0 : external clock input to serial core logic 0 1 1 : setting prohibited 1 0 0 : internal clock output according to serial core logic 1 0 1 : internal clock output according to serial core logic 1 1 0 : external clock input to serial core logic 1 1 1 : setting prohibited : don't care the sck pin state is read from this bit instead of the set value. 1 spbio 0 r/w serial port break input/output control controls the txd pin in co mbination with the spbdt bit in this register and the te bit in scscr.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 271 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 spbdt ? * r/w serial port break data controls the txd pin in combination with the spbio bit in this register and the te bit in scscr. the rxd pin state can also be monitored. select the txd or rxd pin function in the pfc (pin function controller) beforehand. te spbio spbdt: txd pin state 0 0 : input (initial state) 0 1 0: low level output 0 1 1: high level output 0 : transmit data output according to serial core logic : don't care the rxd pin state is read from this bit instead of the set value. note: * this bit is read as an undefined value and the setting value is 0.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 272 of 502 rej09b0239-0400 12.3.12 line status register (sclsr) sclsr is a 16-bit readable/writable register which can always be read from and written to by the cpu. however, a 1 cannot be written to the orer fl ag. this flag can be cleared to 0 only if it has first been read (after being set to 1). sclsr is initialized to h'0000 by a power-on reset. bit bit name initial value r/w description 15 to 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 orer 0 r/(w) * overrun error indicates the occurrence of an overrun error. 0: receiving is in progress or has ended normally * 1 [clearing conditions] ? orer is cleared to 0 when the chip is a power-on reset ? orer is cleared to 0 when 0 is written after 1 is read from orer. 1: an overrun error has occurred * 2 [setting condition] orer is set to 1 when the next serial receiving is finished while receive fifo data are full. notes: 1. clearing the re bit to 0 in scscr does not affect the orer bit, which retains its previous value. 2. the receive fifo data register (scfrdr) hold the data before an overrun error is occurred, and the next receive data is extinguished. when orer is set to 1, scif can not continue the next serial receiving. note: * the only value that can be writ ten is 0 to clear the flag.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 273 of 502 rej09b0239-0400 12.4 operation 12.4.1 overview for serial communication, th e scif has an asynchronous mode in which characters are synchronized individually, and a synchronous mode in which communication is synchronized with clock pulses. the scif has a 16-byte fifo buffe r for both transmit and receive operations, reducing the overhead of the cpu, and enabling continuous high-speed communication. moreover, it has rts and cts signals as modem control signals (only for channel 0). the transmission format is selected in the serial mode register (scs mr). the scif clock source is selected by the combination of the cke1 and cke0 bits in the serial control register (scscr). asynchronous mode: ? data length is selectable: 7 or 8 bits. ? parity bit is selectable. so is the stop bit length (1 or 2 bits). the combination of the preceding selections constitutes the communication format and character length. ? in receiving, it is possible to detect framing er rors, parity errors, r eceive fifo data full, overrun errors, receive data ready, and breaks. ? the number of stored data bytes is indicated fo r both the transmit and receive fifo registers. ? an internal or external clock can be selected as the scif clock source. ? when an internal clock is selected, the sc if operates using the on-chip baud rate generator. ? when an external clock is selected, the external clock input must have a frequency 16 times the bit rate. (the on-chip baud rate generator is not used.) synchronous mode: ? the transmission/reception format has a fixed 8-bit data length. ? in receiving, it is possible to detect overrun errors (orer). ? an internal or external clock can be selected as the scif clock source. ? when an internal clock is selected, the sc if operates using the on-chip baud rate generator, and outputs a serial clock signal to external devices. ? when an external clock is selected, the scif operates on the input serial clock. the on- chip baud rate generator is not used.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 274 of 502 rej09b0239-0400 table 12.8 scsmr settings and scif communication formats scsmr settings scif communication format bit 7 c/ a bit 6 chr bit 5 pe bit 3 stop mode data length pa rity bit stop bit length 0 0 0 0 8-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 2 bits 1 0 0 7-bit not set 1 bit 1 2 bits 1 0 set 1 bit 1 asynchronous 2 bits 1 * * * synchronous 8-bit not set none note: * : don't care table 12.9 scsmr and scscr setting s and scif clock source selection scsmr scscr settings scif transmit/receive clock bit 7 c/ a bit 1 cke1 bit 0 cke0 mode clock source sck pin function 0 0 0 asynchronous internal scif does not use the sck pin. the state of the sck pin depends on both the sckio and sckdt bits. 1 clock with a frequency 16 times the bit rate is output. 1 0 external input a clock with frequency 16 times the bit rate. 1 ? setting prohibited. 1 0 * synchronous internal serial clock is output. 1 0 external input the serial clock. 1 ? setting prohibited. note: * : don't care
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 275 of 502 rej09b0239-0400 12.4.2 operation in asynchronous mode in asynchronous mode, each transmitted or received ch aracter begins with a start bit and ends with a stop bit. serial comm unication is synchronized one character at a time. the transmitting and receiving sections of th e scif are independent, so full duplex communication is possible. the tr ansmitter and receiver are 16-byte fifo buffered, so data can be written and read while transmitting and receiving are in progress, enabling continuou s transmitting and receiving. figure 12.2 shows the general format of asyn chronous serial communi cation. in asynchronous serial communication, the communicatio n line is normally held in the mark (high) state. the scif monitors the line and starts serial communicati on when the line goes to the space (low) state, indicating a start bit. one serial ch aracter consists of a start bit (low), data (lsb first), parity bit (high or low), and stop bit (high), in that order. when receiving in asynchronous mode , the scif synchronizes at the falling edge of the start bit. the scif samples each data bit on the eighth pulse of a clock with a frequency 16 times the bit rate. receive data is latched at the center of each bit. lsb start bit msb idle state (mark state) stop bit 0 transmit/receive data d0 d1 d2 d3 d4 d5 d6 d7 0/1 1 1 1 1 serial data parity bit 1 bit 1 or 2 bits 7 or 8 bits 1 bit or none one unit of transfer data (character or frame) figure 12.2 example of data form at in asynchronous communication (8-bit data with parity and two stop bits)
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 276 of 502 rej09b0239-0400 transmit/receive formats: table 12.10 lists the eight commu nication formats that can be selected in asynchronous mode. the format is selected by sett ings in the serial mode register (scsmr). table 12.10 serial communication formats (asynchronous mode) scsmr bits serial transmit /receive format and frame length chr pe stop 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 start 8-bit data stop 0 0 1 start 8-bit data stop stop 0 1 0 start 8-bit data p stop 0 1 1 start 8-bit data p stop stop 1 0 0 start 7-bit data stop 1 0 1 start 7-bit data stop stop 1 1 0 start 7-bit data p stop 1 1 1 start 7-bit data p stop stop [legend] start: start bit stop: stop bit p: parity bit clock: an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the scif tr ansmit/receive clock. the clock source is selected by the c/ a bit in the serial mode register (scsmr) and bits cke1 and cke0 in the serial control register (scscr) (table 12.9). when an external clock is input at the sck pin, it must have a frequency equal to 16 times the desired bit rate. when the scif operates on an internal clock, it can output a clock signal at the sck pin. the frequency of this output clock is equal to 16 times the desired bit rate.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 277 of 502 rej09b0239-0400 transmitting and receiving data: scif init ialization (asynchronous mode): before transmitting or receiving, clear the te and re bits to 0 in the serial control register (scscr), then initialize the scif as follows. when changing the operation mode or the communication format, always clear the te and re bits to 0 before following the procedure given below. clearing te to 0 initializes the transmit shift register (sctsr). clearing te and re to 0, however, does not initialize the serial status register (scfsr), transmit fifo data register (scftdr), or receive fifo data register (scfrdr), which retain their previous contents. clear te to 0 afte r all transmit data has been transmitted and the tend flag in the scfsr is set. the te bit can be cleared to 0 during transmission, but the transmit data goes to the mark state after the bit is cleared to 0. set the tfrst bit in scfcr to 1 and reset scftdr before te is set again to start transmission. when an external clock is used, the clock should not be stopped during initialization or subsequent operation. scif operation becomes unreliable if the clock is stopped.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 278 of 502 rej09b0239-0400 figure 12.3 shows a sample flowchart for initializing the scif. start of initialization clear te and re bits in scscr to 0 set tfrst and rfrst bits in scfcr to 1 set cke1 and cke0 bits in scscr (leaving te, re, tie, and rie bits cleared to 0) set data transfer format in scsmr set value in scbrr 1-bit interval elapsed? set rtrg1-0 and ttrg1-0 bits in scfcr, and clear tfrst and rfrst bits to 0 set te and re bits in scscr to 1, and set tie, rie, and reie bits end of initialization wait no yes set the clock selection in scscr. be sure to clear bits tie, rie, te, and re to 0. set the data transfer format in scsmr. write a value corresponding to the bit rate into scbrr. (not necessary if an external clock is used.) wait at least one bit interval, then set the te bit or re bit in scscr to 1. also set the rie, reie, and tie bits. setting the te bit enables the txd and rxd pins to be used. when transmitting, the scif will go to the mark state; when receiving, it will go to the idle state, waiting for a start bit. [1] [1] [2] [3] [4] [2] [3] [4] after reading brk, dr, and er flags in scfsr, and each flag in sclsr, write 0 to clear them figure 12.3 sample flowchart for scif initialization
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 279 of 502 rej09b0239-0400 transmitting serial data (asynchronous mode): figure 12.4 shows a sample flow chart for serial transmission. use the following procedure for serial data transm ission after enabling the scif for transmission. start of transmission read tdfe flag in scfsr tdfe = 1? write transmit data in scftdr, and read 1 from tdfe flag and tend flag in scfsr, then clear to 0 all data transmitted? read tend flag in scfsr tend = 1? break output? clear spbdt to 0 and set spbio to 1 clear te bit in scscr to 0 end of transmission no yes no yes no yes no yes [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr, and read 1 from the tdfe and tend flags, then clear to 0. the number of transmit data bytes that can be written is 16 - (transmit trigger set number). [2] serial transmission continuation procedure: to continue serial transmission, read 1 from the tdfe flag to confirm that writing is possible, then write data to scftdr, and then clear the tdfe flag to 0. [3] break output at the end of serial transmission: to output a break in serial transmission, clear the spbdt bit to 0 and set the spbio bit to 1 in scsptr, then clear the te bit in scscr to 0. in [1] and [2], it is possible to ascertain the number of data bytes that can be written from the number of transmit data bytes in scftdr indicated by the upper 8 bits of scfdr. [1] [2] [3] figure 12.4 sample flowchart for transmitting serial data
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 280 of 502 rej09b0239-0400 in serial transmission, the scif operates as described below. 1. when data is written into the transmit fifo data register (scftdr), the scif transfers the data from scftdr to the transmit shift register (sctsr) and starts tran smitting. confirm that the tdfe flag in the serial status register (sc fsr) is set to 1 before writing transmit data to scftdr. the number of data bytes that can be written is (16 ? transmit trigger setting). 2. when data is transferred from scftdr to sctsr and transmission is started, consecutive transmit operations are performed until there is no transmit data left in scftdr. when the number of transmit data bytes in scftdr falls below the transmit trigger number set in the fifo control register (scfcr), the tdfe flag is se t. if the tie bit in the serial control register (scsr) is set to 1 at this time, a transm it-fifo-data-empty interrupt (txi) request is generated. the serial transmit data is sent from the txd pin in the following order. a. start bit: one-bit 0 is output. b. transmit data: 8-bit or 7-bit data is output in lsb-first order. c. parity bit: one parity bit (even or odd parity) is output. (a format in which a parity bit is not output can also be selected.) d. stop bit(s): one or two 1 bits (stop bits) are output. e. mark state: 1 is output continuously until the start bit that starts the next transmission is sent. 3. the scif checks the scftdr transmit data at the timing for sending the stop bit. if data is present, the data is transferred from scftdr to sctsr, the stop bit is sent, and then serial transmission of the next frame is started. if th ere is no transmit data, the tend flag in scfsr is set to 1, the stop bit is sent, and then the line goes to the mark state in which 1 is output continuously.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 281 of 502 rej09b0239-0400 figure 12.5 shows an example of the operation for transmission. 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 1 1 tdfe tend serial data start bit data parity bit stop bit start bit idle state (mark state) data parity bit stop bit txi interrupt request data written to scftdr and tdfe flag read as 1 then cleared to 0 by txi interrupt handler one frame txi interrupt request figure 12.5 example of transmit operation (8-bit data, parity, one stop bit) 4. when modem control is enabled, transmission can be stopped and rest arted in accordance with the cts input value. when cts is set to 1, if transmission is in progress, the line goes to the mark state after transmission of one frame. when cts is set to 0, the next transmit data is output starting from the start bit. figure 12.6 shows an example of the operation when modem control is used (only for channel 0). serial data txd 0 d0 d1 d7 0/1 0 1 d0 d1 d7 0/1 cts drive high before stop bit start bit parity bit stop bit start bit figure 12.6 example of op eration using modem control ( cts )
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 282 of 502 rej09b0239-0400 receiving serial data (asynchronous mode): figures 12.7 and 12.8 show a sample flowchart for serial reception. use the following procedure for serial data r eception after enab ling the scif for reception. start of reception read er, dr, brk flags in scfsr and orer flag in sclsr er, dr, brk or orer = 1? read rdf flag in scfsr rdf = 1? read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling and break detection: read the dr, er, and brk flags in scfsr, and the orer flag in sclsr, to identify any error, perform the appropriate error handling, then clear the dr, er, brk, and orer flags to 0. in the case of a framing error, a break can also be detected by reading the value of the rxd pin. [2] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, read 1 from the rdf flag, and then clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxi interrupt. [3] serial reception continuation procedure: to continue serial reception, read at least the receive trigger set number of receive data bytes from scfrdr, read 1 from the rdf flag, then clear the rdf flag to 0. the number of receive data bytes in scfrdr can be ascertained by reading from scrfdr. [1] [2] [3] figure 12.7 sample flowchar t for receiving serial data
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 283 of 502 rej09b0239-0400 error handling receive error handling er = 1? brk = 1? break handling dr = 1? read receive data in scfrdr clear dr, er, brk flags in scfsr, and orer flag in sclsr, to 0 end yes yes yes no overrun error handling orer = 1? yes no no no [1] whether a framing error or parity error has occurred in the receive data that is to be read from scfrdr can be ascertained from the fer and per bits in scfsr. [2] when a break signal is received, receive data is not transferred to scfrdr while the brk flag is set. however, note that the last data in scfrdr is h'00, and the break data in which a framing error occurred is stored. figure 12.8 sample flowchart fo r receiving serial data (cont)
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 284 of 502 rej09b0239-0400 in serial reception, the scif operates as described below. 1. the scif monitors the transmission line, and if a 0 start bit is detected, performs internal synchronization and starts reception. 2. the received data is stored in scrsr in lsb-to-msb order. 3. the parity bit and stop bit are received. after receiving these bits, the scif carries out the following checks. a. stop bit check: the scif checks whether the st op bit is 1. if there are two stop bits, only the first is checked. b. the scif checks whether receive data can be transferred from the receive shift register (scrsr) to scfrdr. c. overrun check: the scif checks that the orer flag is 0, indicating that the overrun error has not occurred. d. break check: the scif checks that the brk fl ag is 0, indicating that the break state is not set. if all the above checks are passed, the receive data is stored in scfrdr. note: when a parity error or a framing error occurs, reception is not suspended. 4. if the rie bit in scscr is set to 1 when th e rdf or dr flag change s to 1, a receive-fifo- data-full interrupt (rxi) request is generated. if the rie bit or the reie bit in scscr is set to 1 when the er flag changes to 1, a receive-error interrupt (eri) request is generated. if the rie bit or the reie bit in scscr is set to 1 when the brk or orer flag changes to 1, a break reception interrupt (br i) request is generated. figure 12.9 shows an example of the operation for reception.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 285 of 502 rej09b0239-0400 1 0 d0 d1 d7 0/1 1 0 d0 d1 d7 0/1 0/1 0 rdf fer serial data start bit data parity bit stop bit start bit data parity bit stop bit rxi interrupt request one frame data read and rdf flag read as 1 then cleared to 0 by rxi interrupt handler eri interrupt request generated by receive error figure 12.9 example of scif receive operation (8-bit data, parity, one stop bit) 5. when modem control is enabled, the rts signal is output depending on the empty status of scfrdr. when rts is 0, reception is possible. when rts is 1, this indicates that the scfrdr is full and no extra data can be received. (only for channel 0 and channel 1) figure 12.10 shows an example of the operation when modem control is used. d0 d1 d2 d7 0/1 d0 d1 d7 0/1 10 0 rts serial data rxd start bit parity bit stop bit start bit figure 12.10 example of op eration using modem control ( rts )
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 286 of 502 rej09b0239-0400 12.4.3 synchronous mode in synchronous mode, the scif transmits and recei ves data in synchronization with clock pulses. this mode is suitable for high-speed serial communication. the scif transmitter and receiver are independe nt, so full-duplex communication is possible while sharing the same clock. th e transmitter and receiver are al so 16-byte fifo buffered, so continuous transmitting or receiving is possible by reading or writing data while transmitting or receiving is in progress. figure 12.11 shows the general format in synchronous serial communication. don?t care don?t care one unit of transfer data (character or frame) bit 0 serial data synchronization clock bit 1 bit 3 bit 4 bit 5 lsb msb bit 2 bit 6 bit 7 * * note: * high except in continuous transfer figure 12.11 data format in synchronous communication in synchronous serial communica tion, each data bit is output on the communication line from one falling edge of the serial clock to the next. data is guaranteed valid at the rising edge of the serial clock. in each character, the serial data bits are transmitted in order from the lsb (first) to the msb (last). after output of the msb, the communication line remain s in the state of the msb. in synchronous mode, the scif transmits data by sync hronizing with the falling edge of the serial clock, and receives data by synchronizing wi th the rising edge of the serial clock.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 287 of 502 rej09b0239-0400 communication format: the data length is fixed at eight bits. no parity bit can be added. clock: an internal clock generated by the on-chip baud rate generator or an external clock input from the sck pin can be selected as the scif transmit/receive clock. when the scif operates on an internal clock, it outputs the clock signal at the sck pin. eight clock pulses are output per transmitted or received character. when the scif is not transmitting or receiving, the clock signal remains in the high st ate. when only receiving, the clock signal outputs while the re bit of scscr is 1 an d the number of data in receive fifo is less than the receive fifo data trigger number. in this case, 8 (16 + 1) = 136 pulses of synchronous clock are output. to perform reception of n characters of data, select an external clock as the clock source. if an internal clock should be used, set re = 1 and te = 1 and receive n characters of data simultaneously with the transmission of n characters of dummy data. transmitting and receiving data scif initializati on (synchronous mode): before transmitting, receiving, or changing the mode or communication format, the software must clear the te and re bits to 0 in the serial control re gister (scscr), then in itialize the scif. clearing te to 0 initializes the transmit shift register (s ctsr). clearing re to 0, however, does not initialize the rdf, per, fer, and orer flags an d receive data register (scrdr), which retain their previous contents.
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 288 of 502 rej09b0239-0400 figure 12.12 shows a sample flowchart for initializing the scif. the procedure for initializing the scif is: start of initialization clear te and re bits in scscr to 0 set tfrst and rfrst bits in scfcr to 1 to clear the fifo buffer after reading brk, dr, and er flags in scfsr and a flag in sclsr, write 0 to clear them set cke1 and cke0 bits in scscr (leaving te, re, tie, and rie bits cleared to 0) set data transfer format in scsmr set value in scbrr 1-bit interval elapsed? set rtrg1-0 and ttrg1-0 bits in scfcr, and clear tfrst and rfrst bits to 0 set te and re bits in scscr to 1, and set tie, rie, and reie bits end of initialization wait no yes leave the te and re bits cleared to 0 until the initialization almost ends. be sure to clear the tie, rie, te, and re bits to 0. set the cke1 and cke0 bits. set the data transfer format in scsmr. write a value corresponding to the bit rate into scbrr. this is not necessary if an external clock is used. wait at least one bit interval after this write before moving to the next step. set the te or re bit in scscr to 1. also set the tei, rie, and reie bits to enable the txd, rxd, and sck pins to be used. when transmitting, the txd pin will go to the mark state. when receiving in clocked synchronous mode with the synchronization clock output (clock master) selected, a clock starts to be output from the scif_clk pin at this point. [1] [1] [2] [3] [4] [5] [2] [3] [4] [5] figure 12.12 sample flowchart for scif initialization
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 289 of 502 rej09b0239-0400 transmitting serial data (synchronous mode): figure 12.13 shows a sample flowchart for transmitting serial data. start of transmission read tdfe flag in scfsr tdfe = 1? write transmit data to scftdr read tdfe and tend flags in scfsr while they are 1, then clear them to 0 all data transmitted? read tend flag in scfsr tend = 1? clear te bit in scscr to 0 end of transmission no yes no yes no yes [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr. read the tdfe and tend flags while they are 1, then clear them to 0. [2] serial transmission continuation procedeure: to continue serial transmission, read 1 from the tdfe flag to confirm that writing is possible, then write data to scftdr, and then clear the tdfe flag to 0. [1] [2] figure 12.13 sample flowchart for transmitting serial data
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 290 of 502 rej09b0239-0400 in transmitting serial data, the scif operates as follows: 1. when data is written into the transmit fifo data register (scftdr), the scif transfers the data from scftdr to the transmit shift register (sctsr) and starts tran smitting. confirm that the tdfe flag in the serial status register (sc fsr) is set to 1 before writing transmit data to scftdr. the number of data bytes that can be written is (16 ? transmit trigger setting). 2. when data is transferred from scftdr to sctsr and transmission is started, consecutive transmit operations are performed until there is no transmit data left in scftdr. when the number of transmit data bytes in scftdr falls below the transmit trigger number set in the fifo control register (scfcr), the tdfe flag is se t. if the tie bit in the serial control register (scsr) is set to 1 at this time, a transm it-fifo-data-empty interrupt (txi) request is generated. if clock output mode is selected, the scif outputs eight synchronous clock pulses. if an external clock source is selected, the scif ou tputs data in synchronization with the input clock. data is output from the txd pin in order from the lsb (bit 0) to the msb (bit 7). 3. the scif checks the scftdr transmit data at the timing for sending the msb (bit 7). if data is present, the data is transf erred from scftdr to sctsr, the msb (bit 7) is sent, and then serial transmission of the next frame is started. if there is no transmit data, the tend flag in scfsr is set to 1, the msb (bit 7) is sent, and then the txd pin holds the states. 4. after the end of serial transmission, the sck pin is held in the high state. figure 12.14 shows an example of scif transmit operation. synchronization clock serial data tdfe tend data written to scftdr and tdfe flag cleared to 0 by txi interrupt handler one frame bit 0 lsb txi interrupt request msb bit 1 bit 6 bit 7 bit 7 bit 0 bit 1 txi interrupt request figure 12.14 example of scif transmit operation
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 291 of 502 rej09b0239-0400 receiving serial data (synchronous mode): figures 12.15 and 12.16 show a sample flowchart for receiving serial data. when switching from asynchronous mode to sy nchronous mode without scif initialization, make sure that or er, per, and fer are cleared to 0. start of reception read orer flag in sclsr orer = 1? read rdf flag in scfsr rdf = 1? read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? clear re bit in scscr to 0 end of reception yes no yes yes no no error handling [1] receive error handling: read the orer flag in sclsr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. transmission/reception cannot be resumed while the orer flag is set to 1. [2] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, and clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxi interrupt. [3] serial reception continuation procedure: to continue serial reception, read at least the receive trigger set number of receive data bytes from scfrdr, read 1 from the rdf flag, then clear the rdf flag to 0. the number of receive data bytes in scfrdr can be ascertained by reading scfrdr. [1] [2] [3] figure 12.15 sample flowchart for receiving serial data (1) error handling clear orer flag in sclsr to 0 end overrun error handling orer = 1? yes no figure 12.16 sample flowchart for receiving serial data (2)
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 292 of 502 rej09b0239-0400 in receiving, the scif operates as follows: 1. the scif synchronizes with serial clock input or output and initializes internally. 2. receive data is shifted into scrsr in order from the lsb to the msb. after receiving the data, the scif checks the receive data can be load ed from scrsr into scfrdr or not. if this check is passed, the scif stores the received data in scfrdr. if the check is not passed (overrun error is detected), further reception is prevented. 3. after setting rdf to 1, if th e receive-data-full interrupt enable bit (rie) is set to 1 in scscr, the scif requests a receive-data -full interrupt (rxi). if the orer bit is set to 1 and the rie bit or reie bit in scscr is also set to 1, the scif requests a break interrupt (bri). figure 12.17 shows an example of scif receive operation. synchronization clock serial data rdf orer data read from scfrdr and rdf flag cleared to 0 by rxi interrupt handler one frame bit 7 lsb rxi interrupt request msb bit 0 bit 6 bit 7 bit 7 bit 0 bit 1 bri interrupt request by overrun error rxi interrupt request figure 12.17 example of scif receive operation
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 293 of 502 rej09b0239-0400 transmitting and receiving serial data simultaneously (synchronous mode): figure 12.18 shows a sample flowchart fo r transmitting and receiving se rial data simultaneously. [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr. read the tdfe and tend flags while they are 1, then clear them to 0. the transition of the tdfe flag from 0 to 1 can also be identified by a txi interrupt. [2] receive error handling: read the orer flag in sclsr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. transmission/reception cannot be resumed while the orer flag is set to 1. [3] scif status check and receive data read: read scfsr and check that rdf = 1, then read the receive data in scfrdr, and clear the rdf flag to 0. the transition of the rdf flag from 0 to 1 can also be identified by an rxi interrupt. [4] serial transmission and reception continuation procedure: to continue serial transmission and reception, read 1 from the rdf flag and the receive data in scfrdr, and clear the rdf flag to 0 before receiving the msb in the current frame. similarly, read 1 from the tdfe flag to confirm that writing is possible before transmitting the msb in the current frame. then write data to scftdr and clear the tdfe flag to 0. when switching from a transmit operation or receive operation to simultaneous transmission and reception operations, clear the te and re bits to 0, and then set them simultaneously to 1. note: start of transmission and reception initialization read tdfe flag in scfsr tdfe = 1? write transmit data to scftdr read tdfe and tend flags in scfsr while they are 1, then clear them to 0 read orer flag in sclsr orer = 1? read rdf flag in scfsr rdf = 1? clear te and re bits in scscr to 0 end of transmission and reception read receive data in scfrdr, and clear rdf flag in scfsr to 0 all data received? no no yes no no yes yes [1] yes error handling [4] [3] [2] figure 12.18 sample flowchart for transmitting/receiving serial data
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 294 of 502 rej09b0239-0400 12.5 scif interrupts the scif has four interrupt sources: transmit-fifo-data-empty (txi), receive-error (eri), receive-data-full (rxi), and break (bri). table 12.11 shows the interrupt sources and their order of priority. the interrupt sources are enabled or disabled by means of the tie, rie, and reie bits in scscr. a separate interrupt request is sent to the interrupt contro ller for each of these interrupt sources. when txi request is enabled by tie bit and the tdfe flag in the serial stat us register (scfsr) is set to 1, a txi interrupt request is generated. when rxi request is enabled by rie bit and the rdf or dr flag in scfsr is set to 1, an rxi interrupt request is generated. the rxi interrupt request caused by dr flag is generated only in asynchronous mode. when bri request is enabled by rie bit or reie bit and the brk flag in scfsr or orer flag in sclsr is set to 1, a bri interrupt request is generated. when eri request is enabled by rie bit or reie bit and the er flag in scfcr is set to 1, an eri interrupt request is generated. when the rie bit is set to 0 and the reie bit is set to 1, scif request eri interrupt and bri interrupt without requesting rxi interrupt. the txi interrupt indicates that transmit data can be written, and the rxi interrupt indicates that there is receive data in scfrdr. table 12.11 scif interrupt sources interrupt source description interrupt enable bit priority on reset release eri interrupt initiated by receive error (er) rie or reie high rxi interrupt initiated by rece ive data fifo full (rdf) or data ready (dr) rie bri interrupt initiated by break (brk) or overrun error (orer) rie or reie txi interrupt initiated by transmit fifo data empty (tdfe) tie low
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 295 of 502 rej09b0239-0400 12.6 serial port register (s csptr) and scif pins the relationship between scsptr and the scif pins is shown in figures 12.19 to 12.23. sptrw: scsptr write sptrr: scsptr read note: * the modem control function is specified for the rts pin by setting the mce bit in scfcr. reset internal data bus modem control enable signal * bit 7 bit 6 reset rts signal qd r rtsio rts c qd r rtsdt sptrw sptrw sptrr c figure 12.19 rtsio bit, rtsdt bit, and rts pin
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 296 of 502 rej09b0239-0400 sptrw: scsptr write sptrr: scsptr read note: * the modem control function is specified for the cts pin by setting the mce bit in scfcr. reset internal data bus modem control enable signal * bit 5 bit 4 reset cts signal qd r ctsio cts c qd r ctsdt sptrw sptrw sptrr c figure 12.20 ctsio bit, ctsdt bit, and cts pin
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 297 of 502 rej09b0239-0400 sptrw: scsptr write sptrr: scsptr read note: * these signals control the sck pin according to the settings of the c/ a bit in scsmr and bits cke1 and cke0 in scscr. reset internal data bus clock output enable signal * sirial clock output signal * serial clock input signal * serial input enable signal * bit 3 bit 2 reset qd r sckio sck2 c qd r sckdt sptrw sptrw sptrr c figure 12.21 sckio bit, sckdt bit, and sck pin sptrw: scsptr write reset internal data bus transmit enable signal bit 1 bit 0 reset serial transmit data qd r spbio txd c qd r spbdt sptrw sptrw c figure 12.22 spbio bit, spbdt bit, and txd pin
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 298 of 502 rej09b0239-0400 sptrr: scsptr read internal data bus serial receive data rxd sptrr bit 0 figure 12.23 spbdt bit and rxd pin 12.7 usage notes note the following when using the scif. 1. scftdr writing and tdfe flag the tdfe flag in the serial status register (s cfsr) is set when the number of transmit data bytes written in the transmit fifo data regi ster (scftdr) has fa llen below the transmit trigger number set by bits ttrg1 and ttrg0 in the fifo control register (scfcr). after tdfe is set, transmit data up to the number of empty bytes in scftdr can be written, allowing efficient continuous transmission. however, if the number of data bytes written in scftdr is equal to or less than the transmit trigger number, the tdfe flag will be set to 1 again after being read as 1 and cleared to 0. tdfe clearing should therefore be carried out when scftdr contains more than the transmit trigger number of transmit data bytes. the number of tran smit data bytes in scftdr can be found from the upper 8 bits of the fifo data count register (scfdr). 2. scfrdr reading and rdf flag the rdf flag in the serial status register (scfsr) is set when th e number of receive data bytes in the receive fifo data register (scfrdr) ha s become equal to or greater than the receive trigger number set by bits rtrg1 and rtrg0 in the fifo control register (scfcr). after rdf is set, receive data equivalent to the trig ger number can be read from scfrdr, allowing efficient continuous reception. however, if the number of data bytes in scfrdr is equal to or greater than the trigger number, the rdf flag will be set to 1 again if it is cleared to 0. rdf should therefore be cleared to 0 after being read as 1 after all the receive data has been read. the number of receive data bytes in scfrdr can be found from the lowe r 8 bits of the fifo data count register (scfdr).
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 299 of 502 rej09b0239-0400 3. break detection and processing break signals can be detected by reading the rxd pin directly when a framing error (fer) is detected. in the break state the in put from the rxd pin consists of all 0s, so the fer flag is set and the parity error flag (per) ma y also be set. note that, altho ugh transfer of receive data to scfrdr is halted in the break state, th e scif receiver continues to operate. 4. sending a break signal the i/o condition and level of the txd pin are determined by the spbio and spbdt bits in the serial port register (scsptr). this f eature can be used to send a break signal. until te bit is set to 1 (enabling transmission) after initializing, txd pin does not work. during the period, mark status is performed by spbdt bit. therefore, the spbio and spbdt bits should be set to 1 (high level output). to send a break signal during serial transmissi on, clear the spbdt bit to 0 (designating low level), then clear the te bit to 0 (halting transmission). when the te bit is cleared to 0, the transmitter is initialized regardless of the current transmission state, and 0 is output from the txd pin. 5. receive data sampling timing and receive marg in (asynchronous mode) the scif operates on a base clock with a frequenc y of 16 times the transf er rate. in reception, the scif synchronizes internally with the fall of the start bit, which it samples on the base clock. receive data is latched at the rising edge of the eighth base clock pulse. the timing is shown in figure 12.24. 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 6 7 8 9 10 1112 1314 15 0 1 2 3 4 5 d0 d1 16 clocks 8 clocks base clock receive data (rxd) start bit ?7.5 clocks +7.5 clocks synchronization sampling timing data sampling timing figure 12.24 receive data sampling timing in asynchronous mode
section 12 serial communication interface with fifo (scif) rev. 4.00 sep. 13, 2007 page 300 of 502 rej09b0239-0400 the receive margin in asynchron ous mode can therefore be expres sed as shown in equation 1. equation 1: m = (0.5 - ) = (l - 0.5) f - (1+f) 100 % 1 2n d - 0.5 n where: m: receive margin (%) n: ratio of clock frequency to bit rate (n = 16) d: clock duty cycle (d = 0 to 1.0) l: frame length (l = 9 to 12) f: absolute deviation of clock frequency from equation 1, if f = 0 and d = 0.5, the receive margin is 46.875%, as given by equation 2. equation 2: when d = 0.5 and f = 0: m = (0.5 ? 1/(2 16)) 100 % = 46.875 % this is a theoretical value. a reasonable margin to allow in system designs is 20% to 30%. 6. prohibited multiple pin allocation for channel 1 although signal sck1, rxd1, or txd1 can be assigned to pin pd4 or pe20, either of the pin must be selected. for example, if signal sck1 is assigned to both pins pd4 and pe20, correct operation of the scif is not guaranteed. similarly, signal sck1, rxd1, or txd1 can be assigned to pin pd3 or pe19 and pin pd2 or pe18, respectively. however if these signals are assigned to both corresponding pins, correct operation of the scif is not guaranteed. 7. states of the txd and rts pi ns when the te bit is cleared the txdi (i = 0, 1, 2) and rtsj (j = 0, 1) pins usually function as output pins during serial communication. however, even if these functions are selected by the pin function controller (pfc), these pins are in the high impedance state as long as the te bit in scscri (i = 0, 1, 2) is cleared. to make these pins always function as output pins (regardless of the value of the te bit), set scptri (i = 0, 1, 2) and pfc in the following order. a. set the spbio and spbdt bits in scptri (i = 0, 1, 2). set the rtsio and rtsdt bits in scptrj (j = 0, 1). b. select the txdi (i = 0, 1, 2) and rtsj (j = 0, 1) pins by the pfc. 8. interval from when the te bit in scscr is set to 1 until a start bit is transmitted in asynchronous mode in the scif included in former products, a start bit is transmitted after the internal equivalent to one frame. in the scif included in this produc t, however, a start bit is transmitted directly after the te bit is set to 1.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 301 of 502 rej09b0239-0400 section 13 host interface (hif) this lsi incorporates a host in terface (hif) for use in high-speed transfer of data between external devices which cannot utilize the system bus. the hif allows external devices to read from and write to 2 kbytes (1 kbyte 2 banks) of the on- chip ram exclusively for hif use (hifram) within this lsi, in 32-bit units. interrupts issued to this lsi by an external device, interrupts sent from this lsi to the external device, and dma transfer requests sent from this lsi to the external device are also supported. by using hifram and these interrupt functions, software-based data transfer between external devices and this lsi becomes possible, and connection to external devi ces not releasing bus mastership is enabled. using hifram, the hif also supports hif boot mode allowing this lsi to be booted. 13.1 features the hif has the following features. ? an external device can read from or write to hifram in 32-bit units via the hif pins (access in 8-bit or 16-bit units not allowed). the on-chip cpu can read from or write to hifram in 8- bit, 16-bit, or 32-bit units, via the internal peripheral bus. the hifram access mode can be specified as bank mode or non-bank mode. ? when an external device accesses hifram vi a the hif pins, automatic increment of addresses and the endian can be specifi ed with the hif internal registers. ? by writing to specific bits in the hif internal registers from an external device, or by accessing the end address of hifram from the external device, interrupts (internal interrupts) can be issued to the on-chip cpu. conversely, by writing to specific bits in the hif internal registers from the on-chip cpu, interrupts (external interrupts) or dmac transfer requests can be sent from the on-chip cpu to the external device. ? there are seven interrupt source bits each for internal interr upts and external interrupts. accordingly, software control of 128 different interrupts is possible, enabling high-speed data transfer using interrupts. ? in hif boot mode, this lsi can be booted from hifram by an external device storing the instruction code in hifram.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 302 of 502 rej09b0239-0400 figure 13.1 shows a block diagram of the hif. hifscr hifdata hifiicr hifmcr hifeicr hifbcr hifadr hifdtr hifbicr hifidx hifgsr hifcs hifrs hifwr hifrd hifmd hifint hifdreq hifd15 to hifd00 hif hifrdy hifebl hifi hifbi select hifram control circuit internal bus [legend] hif index register hif general status register hif status/control register hif memory control register hif internal interrupt control register hif external interrupt control register hifidx: hifgsr: hifscr: hifmcr: hifiicr: hifeicr: hif address register hif data register hif boot control register hifdreq trigger register hif bank interrupt control register hif interrupt (internal interrupt) hif bank interrupt (internal interrupt) hifadr: hifdata: hifbcr: hifdtr: hifbicr: hifi: hifib: hifram figure 13.1 block diagram of hif
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 303 of 502 rej09b0239-0400 13.2 input/output pins table 13.1 shows the hif pin configuration. table 13.1 pin configuration name abbreviation i/o description hif data pins hifd15 to hifd00 i/o address, data, or command input/output to the hif hif chip select hifcs input chip select input to the hif hif register select hifrs input switching between hif access types 0: normal access (other than below) 1: index register write or status register read hif write hifwr input write strobe signal. low level is input when an external device writes data to the hif. hif read hifrd input read strobe signal. low level is input when an external device reads data from the hif. hif interrupt hifint output interrupt request to an external device from the hif hif mode hifmd input selects whether or not this lsi is started up in hif boot mode. if a power-on reset is canceled when high level is input, this lsi is started up in hif boot mode. hifdmac transfer request hifdreq output to an external device, dmac transfer request with hifram as the destination hif boot ready hifrdy output indicates t hat the hif reset is canceled in this lsi and access from an external device to the hif can be accepted. after 10 clock cycles (max.) of the peripheral clock following negate of the reset input pin of this lsi, this pin is asserted. hif pin enable hifebl input all hif pins other than this pin are asserted by high-level input.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 304 of 502 rej09b0239-0400 13.3 parallel access 13.3.1 operation the hif can be accessed by combining the hifcs , hifrs, hifwr , and hifrd pins. table 13.2 shows the correspondence betw een combinations of these signals and hif operations. table 13.2 hif operations hifcs hifrs hifwr hifrd operation 1 no operation (nop) 0 0 1 0 read from register specified by hifidx[7:0] 0 0 0 1 write to register specified by hifidx[7:0] 0 1 1 0 read from status register (hifgsr[7:0]) 0 1 0 1 write to index register (hifidx[7:0]) 0 1 1 no operation (nop) 0 0 0 setting prohibited [legend] : don't care 13.3.2 connection method when connecting the hif to an external device, a method like that shown in figure 13.2 should be used. external device cs a02 wr rd d15 to d00 hif hifcs hifrs hifwr hifrd hifd15 to hifd00 figure 13.2 hif connection example
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 305 of 502 rej09b0239-0400 13.4 register descriptions the hif has the following registers. ? hif index register (hifidx) ? hif general status register (hifgsr) ? hif status/control register (hifscr) ? hif memory control register (hifmcr) ? hif internal interrupt control register (hifiicr) ? hif external interrupt control register (hifeicr) ? hif address register (hifadr) ? hif data register (hifdata) ? hif boot control register (hifbcr) ? hifdreq trigger register (hifdtr) ? hif bank interrupt control register (hifbicr) 13.4.1 hif index register (hifidx) hifidx is a 32-bit register used to specify the register read from or written to by an external device when the hifrs pin is held low. hifidx can be only read by the on-chip cpu. hifidx can be only written to by an external device while the hifrs pin is driven high. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 306 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 5 4 3 2 reg5 reg4 reg3 reg2 reg1 reg0 0 0 0 0 0 0 r/w * r/w * r/w * r/w * r/w * r/w * hif internal register select these bits specify which register among hifgsr, hifscr, hifmcr, hifii cr, hifeicr, hifadr, hifdata, and hifbcr is accessed by an external device. 000000: hifgsr 000001: hifscr 000010: hifmcr 000011: hifiicr 000100: hifeicr 000101: hifadr 000110: hifdata 001111: hifbcr other than above: setting prohibited 1 0 byte1 byte0 0 0 r/w * r/w * internal register byte specification these bits specify in advance the target word location before the external device accesses a register among hifgsr, hifscr, hifmcr, hifiicr, hifeicr, hifadr, hifdata, and hifbcr. ? when hifscr.bo = 0 00:bits 31 to 16 in register 01: setting prohibited 10: bits 15 to 0 in register 11: setting prohibited ? when hifscr.bo = 1 00: bits 15 to 0 in register 01: setting prohibited 10: bits 31 to 16 in register 11: setting prohibited however, when hifdata is selected using bits reg5 to reg0, each time reading or writing of hifdata occurs, these bits change according to the following rule. 00 10 00 10... repeated note: * this bit can be only written to by an external device while the hifrs pin is held high. it cannot be written to by the on-chip cpu.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 307 of 502 rej09b0239-0400 13.4.2 hif general status register (hifgsr) hifgsr is a 32-bit register, which can be freely used for handshaking between an external device connected to the hif and the softwa re of this lsi. hifgsr can be read from and written to by the on-chip cpu. reading from hifgsr by an external device should be performed with the hifrs pin high, or hifgsr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. writing to hifgsr by an external device should be perf ormed with hifgsr specifi ed by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 16 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 15 to 0 status15 to status0 all 0 r/w general status this register can be read from and written to by an external device connected to the hif, and by the on-chip cpu. these bits are initialized only at a power-on reset. 13.4.3 hif status/control register (hifscr) hifscr is a 32-bit register used to control the hifram access mode and endian setting. hifscr can be read from and written to by the on- chip cpu. access to hi fscr by an external device should be performed with hifscr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 308 of 502 rej09b0239-0400 bit bit name initial value r/w description 11 10 dmd dpol 0 0 r/w r/w dreq mode dreq polarity controls the assert mode for the hifdreq pin. for details on the negate timi ng, see section 13.8, external dmac interface. 00: for a dmac transfer request to an external device, low level is generated at the hifdreq pin. the default for the hifdreq pin is high-level output. 01: for a dmac transfer request to an external device, high level is ge nerated at the hifdreq pin. the default for the hifdreq pin is low-level output. 10: for a dmac transfer request to an external device, falling edge is generated at the hifdreq pin. the default for the hifdreq pin is high-level output. 11: for a dmac transfer request to an external device, rising edge is generated at the hifdreq pin. the default for the hifdreq pin is low-level output.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 309 of 502 rej09b0239-0400 bit bit name initial value r/w description 9 8 bmd bsel 0 0 r/w r/w hifram bank mode hifram bank select controls the hifram access mode. 00: both an external device and the on-chip cpu can access bank 0. when access by both of these conflict, even though the access addresses differ, access by the external device is processed before access by the on-chip cpu. bank 1 cannot be accessed. 01: both an external device and the on-chip cpu can access bank 1. when access by both of these conflict, even though the access addresses differ, access by the external device is processed before access by the on-chip cpu. bank 0 cannot be accessed. 10: an external device can access only bank 0 while the on-chip cpu can access only bank 1. 11: an external device can access only bank 1 while the on-chip cpu can access only bank 0. 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 ? 1 r reserved this bit is always read as 1. the write value should always be 1.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 310 of 502 rej09b0239-0400 bit bit name initial value r/w description 5 md1 0/1 r hif mode 1 indicates whether this lsi was started up in hif boot mode or non-hif boot mode. this bit stores the value of the hifmd pin sampled at a power-on reset 0: started up in non-hif boot mode (booted from the memory connected to area 0) 1: started up in hif boot mode (booted from hifram) 4 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 edn 0 r/w endian for hifram access specifies the byte order when hifram is accessed by the on-chip cpu. 0: big endian (msb first) 1: little endian (lsb first) 0 bo 0 r/w byte order for access of all hif registers including hifdata specifies the byte order when an external device accesses all hif register s including hifdata. 0: big endian (msb first) 1: little endian (lsb first) 13.4.4 hif memory control register (hifmcr) hifmcr is a 32-bit register used to control hifram. hifmcr can be only read by the on-chip cpu. access to hifmcr by an external device should be performed with hifmcr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 311 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 lock 0 r/w * lock this bit is used to lock the access direction (read or write) for consecutive access of hifram by an external device via hifdata. when this bit is set to 1, the values of the rd and wt bits set at the same time are held until this bit is next cleared to 0. when the rd bit and this bit are simultaneously set to 1, consecutive read mode is entered. when the wt bit and this bit are simultaneously set to 1, consecutive write mode is entered. both the rd and wt bits should not be set to 1 simultaneously. 6 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 5 wt 0 r/w * write when this bit is set to 1, the hifdata value is written to the hifram position corresponding to hifadr. if this bit and the lock bit are set to 1 simultaneously, hifram consecutive writ e mode is entered, and high- speed data transfer becomes possible. this mode is maintained until this bit is next cleared to 0, or until the lock bit is cleared to 0. if the lock bit is not simultaneously set to 1 with this bit, writing to hifram is performed only once. thereafter, the value of this bit is automatically cleared to 0. 4 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 3 rd 0 r/w * read when this bit is set to 1, the hifram data corresponding to hifadr is fetched to hifdata. if this bit and the lock bit are set to 1 simultaneously, hifram consecutive read mode is entered, and high- speed data transfer becomes possible. this mode is maintained until this bit is next cleared to 0, or until the lock bit is cleared to 0. if the lock bit is not simultaneously set to 1 with this bit, reading of hifram is performed only once. thereafter, the value of this bit is automatically cleared to 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 312 of 502 rej09b0239-0400 bit bit name initial value r/w description 2, 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 ai/ad 0 r/w * address auto-increment/decrement this bit is valid only when the lock bit is 1. the value of hifadr is automatically incremented by 4 or decremented by 4 according to the setting of this bit each time reading or writing of hifram is performed. 0: auto-increment mode (+4) 1: auto-decrement mode ( ? 4) note: * this bit can be only written to by an exte rnal device when the hifrs pin is low. it cannot be written to by the on-chip cpu. changing the hifram banks accessible from an external device by setting the bmd and bsel bits in hifscr does not affect the setting of this bit. 13.4.5 hif internal interrupt control register (hifiicr) hifiicr is a 32-bit register used to issue interr upts from an external device connected to the hif to the on-chip cpu. access to hi fiicr by an external device sh ould be performed with hifiicr specified by bits reg5 to reg0 in hifidx and the hifrs pin low.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 313 of 502 rej09b0239-0400 bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 6 5 4 3 2 1 iic6 iic5 iic4 iic3 iic2 iic1 iic0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w internal interrupt source these bits specify the source for interrupts generated by the iir bit. these bits can be written to from both an external device and the on-chip cpu. by using these bits, fast execution of interrupt exception handling is possible. these bits are completely under software control, and their values have no effect on the operation of this lsi. 0 iir 0 r/w internal interrupt request while this bit is 1, an interrupt request (hifi) is issued to the on-chip cpu. 13.4.6 hif external interrupt control register (hifeicr) hifeicr is a 32-bit register used to issue interru pts to an external device connected to the hif from this lsi. access to hifeicr by an external device should be performed with hifeicr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 314 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 5 4 3 2 1 eic6 eic5 eic4 eic3 eic2 eic1 eic0 0 0 0 0 0 0 0 r/w r/w r/w r/w r/w r/w r/w external interrupt source these bits specify the source for interrupts generated by the eir bit. these bits can be written to from both an external device and the on-chip cpu. by using these bits, fast execution of interrupt exception handling is possible. these bits are completely under software control, and their values have no effect on the operation of this lsi. 0 eir 0 r/w external interrupt request while this bit is 1, the hifint pin is asserted to issue an interrupt request to an external device from this lsi. 13.4.7 hif address register (hifadr) hifadr is a 32-bit register which indicates the ad dress in hifram to be accessed by an external device. when using the lock bit setting in hi fmcr to specify consecutive access of hifram, auto-increment (+4) or auto-decrement (-4) of th e address, according to the ai/ad bit setting in hifmcr, is performed automatically, and hifadr is updated. hifadr can be only read by the on-chip cpu. access to hifadr by an external device should be performed with hifadr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 to 2 a9 to a2 all 0 r/w * hifram address specification these bits specify the address of hifram to be accessed by an external device, with 32-bit boundary. 1, 0 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. note: * this bit can be only written to by an extern al device when the hifrs pin is low. it cannot be written to by the on-chip cpu.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 315 of 502 rej09b0239-0400 13.4.8 hif data register (hifdata) hifdata is a 32-bit register used to hold data to be written to hifram and data read from hifram for external device accesse s. if hifdata is not used when accessing hifram, it can be used for data transfer between an external device connected to the hif and the on-chip cpu. hifdata can be read from and written to by the on-chip cpu. acces s to hifdata by an external device should be performed with hifdat a specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 0 d31 to d0 all 0 r/w 32-bit data 13.4.9 hif boot control register (hifbcr) hifbcr is a 32-bit register for exclusive control of an external device and the on-chip cpu regarding access of hifram. hifbcr can be only read by the on-chip cpu. access to hifbcr by an external device should be performed with hifbcr specified by bits reg5 to reg0 in hifidx and the hifrs pin low. bit bit name initial value r/w description 31 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 to 1 ? all 0 r/w ac-bit writing assistance these bits should be used to write the bit pattern (h'a5) needed to set the ac bit to 1. these bits are always read as 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 316 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 ac 0/1 r/w hifram access exclusive control controls accessing of hifram by the on-chip cpu for the hifram bank selected by the bmd and bsel bits in hifscr as the bank allowed to be accessed by this lsi. 0:the on-chip cpu can perform reading/writing of hifram. 1: when an hifram read/wr ite operation by the on- chip cpu occurs, the cpu enters the wait state, and execution of the instruction is halted until this bit is cleared to 0. when booted in non-hif boot m ode, the initial value of this bit is 0. when booted in hif boot mode, the initial value of this bit is 1. after an external device writes a boot program to hifram via the hif, clearing this bit to 0 boots the on-chip cpu from hifram. when 1 is written to this bit by an external device, h'a5 should be written to bits 7 to 0 to prevent erroneous writing. 13.4.10 hifdreq trigger register (hifdtr) hifdtr is a 32-bit register. writing to hifdtr by the on-chip cpu asserts the hifdreq pin. hifdtr cannot be accessed by an external device. bit bit name initial value r/w description 31 to 1 ? all 0 r * 1 reserved these bits are always read as 0. the write value should always be 0.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 317 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 dtrg 0 r/w * 1 * 2 hifdreq trigger when 1 is written to this bit, the hifdreq pin is asserted according to the setting of the dmd and dpol bits in hifscr. this bit is automatically cleared to 0 in synchronization with negate of the hifdreq pin. though this bit can be set to 1 by the on-chip cpu, it cannot be cleared to 0. to avoid conflict between clearing of this bit by negate of the hifdreq pin and setting of this bit by the on-chip cpu, make sure this bit is cleared to 0 before setting this bit to 1 by the on-chip cpu. notes: 1. this bit cannot be accessed by an exte rnal device. it can be accessed only by the on- chip cpu. 2. writing 0 to this bit by the on-chip cpu is ignored. 13.4.11 hif bank interrupt control register (hifbicr) hifbicr is a 32-bit register that controls hif bank interrupts. hifbicr cannot be accessed by an external device. bit bit name initial value r/w description 31 to 2 ? all 0 r * 1 reserved these bits are always read as 0. the write value should always be 0. 1 bie 0 r/w * 1 bank interrupt enable enables or disables a bank interrupt request (hifbi) issued to the on-chip cpu. 0: hifbi disabled 1: hifbi enabled
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 318 of 502 rej09b0239-0400 bit bit name initial value r/w description 0 bif 0 r/w * 1 * 2 bank interrupt request flag while this bit is 1, a bank interrupt request (hifbi) is issued to the on-chip cpu according to the setting of the bie bit. in auto-increment mode (ai/ad bit in hifmcr is 0), this bit is automatically set to 1 when an external device has completed access to the 32-bit data in the end address of hifram and the hifcs pin has been negated. in auto-decrement mode (ai/ad bit in hifmcr is 1), this bit is automatically set to 1 when an external device has completed access to the 32-bit data in the start address of hifram and the hifcs pin has been negated. though this bit can be cleared to 0 by the on-chip cpu, it cannot be set to 1. make sure setting of this bit by hifram access from an external device and clearing of this bit by the on- chip cpu do not conflict using software. notes: 1. this bit cannot be accessed by an external device. it can only be accessed by the on- chip cpu. 2. writing 1 to this bit by the on-chip cpu is ignored.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 319 of 502 rej09b0239-0400 13.5 memory map table 13.3 shows the memory map of hifram. table 13.3 memory map classification start address end address memory size map from external device * 1 h'0000 h'03ff 1 kbyte map from on-chip cpu * 1 * 2 h'f84e0000 h'f84e03ff 1 kbyte notes: 1. map for a single hifram bank. which bank is to be accessed by an external device or the on-chip cpu depends on the bmd an d bsel bits in hifscr. the mapping addresses are common between the banks. 2. note that in hif boot mode, bank 0 is selected, and the first 1 kbyte in each of the following address ranges are also mapped: h'00000000 to h'01ffffff (first-half 32 mbytes of area 0 in the p0 area), h'2000 0000 to h'21ffffff (first-half 32 mbytes of area 0 in the p0 area), h'40000000 to h'41fffff f (first-half 32 mbytes of area 0 in the p0 area), h'60000000 to h'61ffff ff (first-half 32 mbytes of area 0 in the p0 area), h'80000000 to h'81ffffff (first- half 32 mbytes of area 0 in the p1 area), h'a0000000 to h'a1ffffff (first-half 32 mbytes of ar ea 0 in the p2 area), and h'c0000000 to h'c1ffffff (first-half 32 mbytes of area 0 in the p3 area). if an external device modifies hifram w hen hifram is accessed from the p0, p1, or p3 area with the cache enabled, coheren cy may not be ensured. when the cache is enabled, accessing hifram from the p2 area is recommended. in hif boot mode, among the first-half 32 mbyt es of each area 0, access to the areas to which hifram is not mapped is inhibited. even in hif boot mode, the second-half 32 mb ytes of area 0, area 3, area 4, area 5b, area 5, area 6b, and area 6 are mapped to the external memory as normally.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 320 of 502 rej09b0239-0400 13.6 interface (basic) figure 13.3 shows the basic read/write sequence. hif read is defined by the overlap period of the hifrd low-level period and hifcs low-level period, and hif write is defined by the overlap period of the hifwr low-level period and hifcs low-level period. the hifrs signal indicates whether this is normal access or index/status register access; low level indicates normal access and high level indicates index/status register access. hifcs hifrs write cycle read cycle hifrd hifwr hifd15 to hifd00 wt_d rd_d figure 13.3 basic ti ming for hif interface
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 321 of 502 rej09b0239-0400 13.7 interface (details) 13.7.1 hifidx write/hifgsr read writing of hifidx and reading of hi fgsr are shown in figure 13.4. hifcs hifrs hifrd hifwr hifd15 to hifd00 wt_d rd_d hifidx write cycle hifgsr read cycle figure 13.4 hifidx write and hifgsr read 13.7.2 reading/writing of hif registers other than hifidx and hifgsr as shown in figure 13.5, in reading and writing of hif internal registers other than hifidx and hifgsr, first hifrs is held high and hifidx is wr itten to in order to sel ect the register to be accessed and the byte location. then hifrs is held low, and reading or wr iting of the register selected by hifidx is performed. hifcs hifrs hifrd hifwr hifd15 to hifd00 wt_d hifidx rd_d index write register write register read register selection figure 13.5 hif register settings
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 322 of 502 rej09b0239-0400 13.7.3 consecutive data writing to hifram by external device figure 13.6 shows the timing chart for consecutiv e data transfer from an external device to hifram. as shown in this timing chart, by setting the start address and the data to be written first, consecutive data transfer can subsequently be performed. hifcs hifrs hifrd hifwr hifd15 to hifd00 0016 ahal 0018 d0d1 001a d2d3 000a 00a0 0018 d4d5 d8d9 d6d7 high level hifadr setting [15:8] = ah [7:0] = al data for first write operation set in hifdata [31:24] = d0, [23:16] = d1, [15:8] = d2, [7:0] = d3 hifmcr setting consecutive write auto-increment hifdata selection consecutive data writing figure 13.6 consecutive data writing to hifram 13.7.4 consecutive data reading from hifram to external device figure 13.7 shows the timing chart for consecutiv e data reading from hifram to an external device. as this timing chart indicates, by setting the start address, data can subsequently be read out consecutively. hifcs hifrs hifrd hifwr 0016 ahal 000a 0088 0018 d0d1 d2d3 d4d5 d6d7 d8d9 dcdd dadb hifadr setting [15:8] = ah [7:0] = al hifmcr setting consecutive read auto-increment consecutive data reading hifdata selection hifd15 to hifd00 figure 13.7 consecutive data reading from hifram
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 323 of 502 rej09b0239-0400 13.8 external dmac interface figures 13.8 to 13.11 show the hifdreq output timing. the start of the hifdreq assert synchronizes with the dtrg bit in hifdtr being set to 1. the hifdreq negate timing and assert level are determined by the dmd and dpol bits in hifscr, respectively. when the external dmac is specified to detect low level of the hifdreq signal, set dmd = 0 and dpol = 0. after writing 1 to the dtrg bit, the hifdreq signal remains low until low level is detected for both the hifcs and hifrs signals. in this case, when the hifdreq signal is used, make sure that the setup time ( hifcs assertion to hifrs settling) and the hold time (hifrs hold to hifcs negate) are satisfied. if t hifas and t hifah stipulated in section 19.4.9, hif timing, are not satisfied, the hifdreq signal may be negated unintentionally. dtrg bit dpol bit hifdreq asserted in synchronization with the dtrg bit being set by the on-chip cpu. the dtrg bit is cleared simultaneously with hifdreq negate. negated when hifcs = hifrs = low level. latency is t pcyc (peripheral clock cycle) 3 cyc or less. hifcs hifrs figure 13.8 hifdreq timing (when dmd = 0 and dpol = 0) when the external dmac is specified to detect high level of the hifdreq signal, set dmd = 0 and dpol = 1. at the time the dpol bit is set to 1, hifdreq becomes low. then after writing 1 to the dtrg bit, hifdreq remains high until low level is detected for both the hifcs and hifrs signals. in this case, when the hifdreq signal is used, make sure that the setup time ( hifcs assertion to hifrs settling) and the hold time (hifrs hold to hifcs negate) are satisfied. if t hifas and t hifah stipulated in section 19.4.9, hif timing, are not satisfied, the hifdreq signal may be negated unintentionally.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 324 of 502 rej09b0239-0400 dtrg bit dpol bit hifdreq hifcs hifrs negated in synchronization with the dpol bit being set by the on-chip cpu. the dtrg bit is cleared simultaneously with hifdreq negate. negated when hifcs = hifrs = low level. latency is t pcyc (peripheral clock cycle) 3 cyc or less. asserted in synchronization with the dtrg bit being set by the on-chip cpu. figure 13.9 hifdreq timing (when dmd = 0 and dpol = 1) when the external dmac is specified to detect the falling edge of the hifdreq signal, set dmd = 1 and dpol = 0. after writing 1 to the dtrg bit, a low pulse of 32 peripheral clock cycles is generated at the hifdreq pin. dtrg bit dpol bit hifdreq after assert, negated when t pcyc (peripheral clock cycle) 32 cyc have elapsed. asserted in synchronization with the dtrg bit being set by the on-chip cpu. the dtrg bit is cleared simultaneously with hifdreq negate. figure 13.10 hifdreq timing (when dmd = 1 and dpol = 0) when the external dmac is specified to detect the rising edge of the hifdreq signal, set dmd = 1 and dpol = 1. at the time the dpol bit is set to 1, hifdreq becomes low. then after writing 1 to the dtrg bit, a low pulse of 32 peripheral clock cycles is generated at the hifdreq pin. dtrg bit dpol bit hifdreq after assert, negated when t pcyc (peripheral clock cycle) 32 cyc have elapsed. asserted in synchronization with the dtrg bit being set by the on-chip cpu. the dtrg bit is cleared simultaneously with hifdreq negate. negated in synchronization with the dpol bit being set by the on-chip cpu. figure 13.11 hifdreq timing (when dmd = 1 and dpol = 1)
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 325 of 502 rej09b0239-0400 when the external dmac supports intermittent op erating mode (block transfer mode), efficient data transfer can be implemented by using th e hifram consecutive acce ss and bank functions.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 326 of 502 rej09b0239-0400 table 13.4 consecutive write proced ure to hifram by external dmac external device this lsi no. cpu dmac hif cpu 1 hif initial setting hif initial setting 2 dmac initial setting 3 set hifadr to hifram end address ? 8 4 select hifdata and write dummy data (4 bytes) to hifdata 5 set hifram consecutive write with address increment in hifmcr 6 select hifdata and write dummy data (4 bytes) to hifdata hif bank interrupt occurs hifram bank switching by hif bank interrupt handler (external device accesses bank 1 and on- chip cpu accesses bank 0) 7 activate dmac assert hifdreq set dtrg bit to 1 8 consecutive data write to bank 1 in hifram 9 write to end address of bank 1 in hifram completes and operation halts hif bank interrupt occurs hifram bank switching by hif bank interrupt handler (external device accesses bank 0 and on- chip cpu accesses bank 1) 10 re-activate dmac assert hifdreq set dtrg bit to 1 11 consecutive data write to bank 0 in hifram read data from bank 1 in hifram
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 327 of 502 rej09b0239-0400 external device this lsi no. cpu dmac hif cpu 12 write to end address of bank 0 in hifram completes and operation halts hif bank interrupt occurs hifram bank switching by hif bank interrupt handler (external device accesses bank 1 and on- chip cpu accesses bank 0) 13 re-activate dmac assert hifdreq set dtrg bit to 1 hereafter no. 11 to 13 are repeated. when a regi ster other than hifdata is accessed (except that hifgsr read with hifrs = low), hifram cons ecutive write is interrupted, and no. 3 to 6 need to be done again. table 13.5 consecutive read procedure from hifram by external dmac external device this lsi no. cpu dmac hif cpu 1 hif initial setting hif initial setting 2 dmac initial setting 3 set hifadr to hifram start address 4 set hifram consecutive read with address increment in hifmcr 5 select hifdata 6 write data to bank 1 in hifram 7 after writing data to end address of bank 1 in hifram, perform hifram bank switching (external device accesses bank 1 and on- chip cpu accesses bank 0) 8 activate dmac assert hifdreq set dtrg bit to 1
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 328 of 502 rej09b0239-0400 external device this lsi no. cpu dmac hif cpu 9 consecutive data read from bank 1 in hifram write data to bank 0 in hifram 10 read from end address of bank 1 in hifram completes and operation halts hif bank interrupt occurs hifram bank switching by hif bank interrupt handler (external device accesses bank 0 and on- chip cpu accesses bank 1) 11 re-activate dmac assert hifdreq set dtrg bit to 1 12 consecutive data read from bank 0 in hifram write data to bank 1 in hifram 13 read from end address of bank 0 in hifram completes and operation halts hif bank interrupt occurs hifram bank switching by hif bank interrupt handler (external device accesses bank 1 and on- chip cpu accesses bank 0) 14 re-activate dmac assert hifdreq set dtrg bit to 1 hereafter no. 12 to 14 are repeated. when a regi ster other than hifdata is accessed (except that hifgsr read with hifrs = low), hifram c onsecutive read is interrupted, and no. 3 to 5 need to be done again.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 329 of 502 rej09b0239-0400 13.9 interface when external device power is cut off when the power supply of an external device in terfacing with the hif is cut off, intermediate levels may be applied to the hif input pins or the hif output pins may drive an external device not powered, thus causing the device to be damaged. the hifebl pin is provided to prevent this from happening. the system power monitor block controls the hifebl pin in synchronization with the cutoff of the external device power so th at all hif pins can be set to the high-impedance state. figure 13.12 shows an imag e of high-impedance control of the hif pins. table 13.6 lists the input/output control for the hif pins. hifcs hifwr hifrd hifd15 to hifd00 hifrs hifmd hifint hifdreq hifrdy hifebl figure 13.12 image of high-impedance control of hif pins by hifebl pin
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 330 of 502 rej09b0239-0400 table 13.6 input/output control for hif pins lsi status reset state by res pin reset canceled by res pin hifmd input level high (boot setting) low (non-boot setting) high (after the reset canceled by boot setting) low (after the reset canceled by non-boot setting) hifebl input level low high the hifebl pin is a general input port and the hif is not controlled by the signal input on this pin. low high general input port at the initial state * 1 hifrdy output control output buffer: on (low output) output buffer: on (low output) general input port output buffer: off output buffer: on (sequence output) general input port at the initial state * 2 hifint output control output buffer: off output buffer: off general input port output buffer: off output buffer: on (sequence output) general input port at the initial state * 2 hifdreq output control output buffer: off output buffer: off general input port output buffer: off output buffer: on (sequence output) general input port at the initial state * 2 hifd 15 to hifd0 i/o control i/o buffer: off i/o buffer: off general input port i/o buffer: off i/o buffer controlled according to states of hifcs , hifwr , and hifrd general input port at the initial state * 2 hifcs input control input buffer: off input buffer: off general input port input buffer: off input buffer: on general input port at the initial state * 2 hifrs input control input buffer: off input buffer: off general input port input buffer: off input buffer: on general input port at the initial state * 2
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 331 of 502 rej09b0239-0400 lsi status reset state by res pin reset canceled by res pin hifmd input level high (boot setting) low (non-boot setting) high (after the reset canceled by boot setting) low (after the reset canceled by non-boot setting) hifebl input level low high the hifebl pin is a general input port and the hif is not controlled by the signal input on this pin. low high general input port at the initial state * 1 hifwr input control input buffer: off input buffer: off general input port input buffer: off input buffer: on general input port at the initial state * 2 hifrd input control input buffer: off input buffer: off general input port input buffer: off input buffer: on general input port at the initial state * 2 notes: 1. the pin also functions as an hifebl pin by setting the pfc registers. 2. the pin also functions as an hif pin by setting the pfc registers. when the hif pin function is selected for the hifebl pin and this pin by setting the pfc registers, the input and/or output buffers are controlled according to the hifebl pin state. when the hif pin function is not selected for the hifebl pin and is selected for this pin by setting the pfc registers, the input and/or output buffers are always turned off. this setting is prohibited.
section 13 host interface (hif) rev. 4.00 sep. 13, 2007 page 332 of 502 rej09b0239-0400
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 333 of 502 rej09b0239-0400 section 14 pin function controller (pfc) the pin function controller (pfc) consists of registers that select multiplexed pin functions and input/output directions. tables 14.1 to 14.5 show the multiplexed pins in this lsi. table 14.6 shows the pin functions in each operating mode. table 14.1 list of mult iplexed pins (port a) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) a pa16 input/output (port) a16 output (bsc) ? ? pa17 input/output (port) a17 output (bsc) ? ? pa18 input/output (port) a18 output (bsc) ? ? pa19 input/output (port) a19 output (bsc) ? ? pa20 input/output (port) a20 output (bsc) ? ? pa21 input/output (port) a21 output (bsc) ? ? pa22 input/output (port) a22 output (bsc) ? ? pa23 input/output (port) a23 output (bsc) ? ? pa24 input/output (port) a24 output (bsc) ? ? pa25 input/output (port) a25 output (bsc) ? ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 334 of 502 rej09b0239-0400 table 14.2 list of mult iplexed pins (port b) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) b pb00 input/output (port) wait input (bsc) ? ? pb01 input/output (port) iois16 input (bsc) ? ? pb02 input/output (port) cke output (bsc) ? ? pb03 input/output (port) cas output (bsc) ? ? pb04 input/output (port) ras output (bsc) ? ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 335 of 502 rej09b0239-0400 port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) b pb05 input/output (port) iciord output (bsc) ? ? pb06 input/output (port) iciowr output (bsc) ? ? pb07 input/output (port) ce2b output (bsc) ? ? pb08 input/output (port) cs6b output (bsc) ce1b output (bsc) ? ? pb09 input/output (port) ce2a output (bsc) ? ? pb10 input/output (port) cs5b output (bsc) ce1a output (bsc) ? ? pb11 input/output (port) cs4 output (bsc) ? ? pb12 input/output (port) cs3 output (bsc) ? ? pb13 input/output (port) bs output (bsc) ? ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 336 of 502 rej09b0239-0400 table 14.3 list of mult iplexed pins (port c) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) c pc00 input/output (port) ? ? ? pc01 input/output (port) ? ? ? pc02 input/output (port) ? ? ? pc03 input/output (port) ? ? ? pc04 input/output (port) ? ? ? pc05 input/output (port) ? ? ? pc06 input/output (port) ? ? ? pc07 input/output (port) ? ? ? pc08 input/output (port) ? ? ? pc09 input/output (port) ? ? ? pc10 input/output (port) ? ? ? pc11 input/output (port) ? ? ? pc12 input/output (port) ? ? ? pc13 input/output (port) ? ? ? pc14 input/output (port) ? ? ? pc15 input/output (port) ? ? ? pc16 input/output (port) ? ? ? pc17 input/output (port) ? ? ? pc18 input/output (port) ? ? ? pc19 input/output (port) ? ? ? pc20 input/output (port) ? ? ? table 14.4 list of mult iplexed pins (port d) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) d pd0 input/output (port) irq0 input (intc) ? ? pd1 input/output (port) irq1 input (intc) ? ? pd2 input/output (port) irq2 input (intc) txd1 output (scif) ? pd3 input/output (port) irq3 input (intc) rxd1 input (scif) ? pd4 input/output (port) irq4 input (intc) sck1 input/output (scif) ? pd5 input/output (port) irq5 input (intc) txd2 output (scif) ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 337 of 502 rej09b0239-0400 port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) pd6 input/output (port) irq6 input (intc) rxd2 input (scif) ? pd7 input/output (port) irq7 input (intc) sck2 input/output (scif) ? table 14.5 list of mult iplexed pins (port e) port function 1 (related module) function 2 (related module) function 3 (related module) function 4 (related module) e pe00 input/output (port) hifebl input (hif) ? ? pe01 input/output (port) hifrdy output (hif) ? ? pe02 input/output (port) hifdreq output (hif) ? ? pe03 input/output (port) hifmd input (hif) ? ? pe04 input/output (port) hifint output (hif) ? ? pe05 input/output (port) hifrd input (hif) ? ? pe06 input/output (port) hifwr input (hif) ? ? pe07 input/output (port) hifrs input (hif) ? ? pe08 input/output (port) hifcs input (hif) ? ? pe09 input/output (port) hifd00 input/output (hif) ? ? pe10 input/output (port) hifd01 input/output (hif) ? ? pe11 input/output (port) hifd02 input/output (hif) ? ? pe12 input/output (port) hifd03 input/output (hif) ? ? pe13 input/output (port) hifd04 input/output (hif) ? ? pe14 input/output (port) hifd05 input/output (hif) ? ? pe15 input/output (port) hifd06 input/output (hif) txd0 output (scif) ? pe16 input/output (port) hifd07 input/output (hif) rxd0 input (scif) ? pe17 input/output (port) hifd08 input/output (hif) sck0 input/output (scif) ? pe18 input/output (port) hifd09 input/output (hif) txd1 output (scif) ? pe19 input/output (port) hifd10 input/output (hif) rxd1 input (scif) ? pe20 input/output (port) hifd11 input/output (hif) sck1 input/output (scif) ? pe21 input/output (port) hifd12 input/output (hif) rts0 output (scif) ? pe22 input/output (port) hifd13 input/output (hif) cts0 input (scif) ? pe23 input/output (port) hifd14 input/output (hif) rts1 output (scif) ? pe24 input/output (port) hifd15 input/output (hif) cts1 input (scif) ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 338 of 502 rej09b0239-0400 table 14.6 pin functions in each operating mode not hif boot mode hif boot mode pin no. initial function function settable by pfc initial function function settable by pfc c14 a00 ? a00 ? b15 a01 ? a01 ? b14 a02 ? a02 ? c13 a03 ? a03 ? b13 a04 ? a04 ? c12 a05 ? a05 ? a13 a06 ? a06 ? b12 a07 ? a07 ? d11 a08 ? a08 ? a12 a09 ? a09 ? c11 a10 ? a10 ? d10 a11 ? a11 ? c10 a12 ? a12 ? a10 a13 ? a13 ? b10 a14 ? a14 ? d9 a15 ? a15 ? b6 pa16 pa16/a16 pa16 pa16/a16 c5 pa17 pa17/a17 pa17 pa17/a17 a5 pa18 pa18/a18 pa18 pa18/a18 b5 pa19 pa19/a19 pa19 pa19/a19 d5 pa20 pa20/a20 pa20 pa20/a20 c4 pa21 pa21/a21 pa21 pa21/a21 a3 pa22 pa22/a22 pa22 pa22/a22 d4 pa23 pa23/a23 pa23 pa23/a23 b3 pa24 pa24/a24 pa24 pa24/a24 a2 pa25 pa25/a25 pa25 pa25/a25 c8 pb00 pb00/ wait pb00 pb00/ wait d7 pb01 pb01/ iois16 pb01 pb01/ iois16
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 339 of 502 rej09b0239-0400 not hif boot mode hif boot mode pin no. initial function function settable by pfc initial function function settable by pfc e12 pb02 pb02/cke pb02 pb02/cke d13 pb03 pb03/ cas pb03 pb03/ cas c15 pb04 pb04/ ras pb04 pb04/ ras e13 ( we0 /dqmll) ? ( we0 /dqmll) ? e15 ( we1 /dqmlu/ we ) ? ( we1 /dqmlu/ we ) ? a8 pb05 pb05/ iciord pb05 pb05/ iciord b8 pb06 pb06/ iciowr pb06 pb06/ iciowr a9 rd ? rd ? e14 rdwr ? rdwr ? c6 pb07 pb07/ ce2b pb07 pb07/ ce2b a6 pb08 pb08/( cs6b / ce1b ) pb08 pb08/( cs6b / ce1b ) c7 pb09 pb09/ ce2a pb09 pb09/ ce2a d6 pb10 pb10/( cs5b / ce1a ) pb10 pb10/( cs5b / ce1a ) b9 pb11 pb11/ cs4 pb11 pb11/ cs4 d12 pb12 pb12/ cs3 pb12 pb12/ cs3 d8 cs0 ? cs0 ? c9 pb13 pb13/ bs pb13 pb13/ bs r3 pc00 pc00 pc00 pc00 p4 pc01 pc01 pc01 pc01 m5 pc02 pc02 pc02 pc02 r4 pc03 pc03 pc03 pc03 p6 pc04 pc04 pc04 pc04 m7 pc05 pc05 pc05 pc05 n7 pc06 pc06 pc06 pc06 r7 pc07 pc07 pc07 pc07 n4 pc08 pc08 pc08 pc08 n3 pc09 pc09 pc09 pc09 n5 pc10 pc10 pc10 pc10 n6 pc11 pc11 pc11 pc11
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 340 of 502 rej09b0239-0400 not hif boot mode hif boot mode pin no. initial function function settable by pfc initial function function settable by pfc p7 pc12 pc12 pc12 pc12 r6 pc13 pc13 pc13 pc13 r8 pc14 pc14 pc14 pc14 p3 pc15 pc15 pc15 pc15 p2 pc16 pc16 pc16 pc16 p1 pc17 pc17 pc17 pc17 m6 pc18 pc18 pc18 pc18 m9 pc19 pc19 pc19 pc19 p8 pc20 pc20 pc20 pc20 d1 pd0 pd0/irq0 pd0 pd0/irq0 e4 pd1 pd1/irq1 pd1 pd1/irq1 d2 pd2 pd2/irq2/txd1 pd2 pd2/irq2/txd1 c1 pd3 pd3/irq3/rxd1 pd3 pd3/irq3/rxd1 d3 pd4 pd4/irq4/sck1 pd4 pd4/irq4/sck1 c2 pd5 pd5/irq5/txd2 pd5 pd5/irq5/txd2 c3 pd6 pd6/irq6/rxd2 pd6 pd6/irq6/rxd2 b2 pd7 pd7/irq7/sck2 pd7 pd7/irq7/sck2 n2 pe00 pe00/hifebl hifebl pe00/hifebl m4 pe01 pe01/hifrdy hifrdy pe01/hifrdy n1 pe02 pe02/hifdreq hifdreq pe02/hifdreq m3 hifmd pe03/hifmd hifmd pe03/hifmd l4 pe04 pe04/ hifint hifint pe04/ hifint l2 pe05 pe05/ hifrd hifrd pe05/ hifrd l1 pe06 pe06/ hifwr hifwr pe06/ hifwr l3 pe07 pe07/hifrs hifrs pe07/hifrs e3 pe08 pe08/ hifcs hifcs pe08/ hifcs k3 pe09 pe09/hifd00 hifd00 pe09/hifd00 k4 pe10 pe10/hifd01 hifd01 pe10/hifd01 j2 pe11 pe11/hifd02 hifd02 pe11/hifd02
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 341 of 502 rej09b0239-0400 not hif boot mode hif boot mode pin no. initial function function settable by pfc initial function function settable by pfc j1 pe12 pe12/hifd03 hifd03 pe12/hifd03 j3 pe13 pe13/hifd04 hifd04 pe13/hifd04 j4 pe14 pe14/hifd05 hifd05 pe14/hifd05 h2 pe15 pe15/hifd06/txd0 hifd06 pe15/hifd06/txd0 h1 pe16 pe16/hifd07/rxd0 hifd07 pe16/hifd07/rxd0 g2 pe17 pe17/hifd08/sck0 hifd08 pe17/hifd08/sck0 g1 pe18 pe18/hifd09/txd1 hifd09 pe18/hifd09/txd1 g3 pe19 pe19/hifd10/rxd1 hifd10 pe19/hifd10/rxd1 g4 pe20 pe20/hifd11/sck1 hifd11 pe20/hifd11/sck1 f2 pe21 pe21/hifd12/rts0 hifd12 pe21/hifd12/rts0 f1 pe22 pe22/hifd13/cts0 hifd13 pe22/hifd13/cts0 f3 pe23 pe23/hifd14/rts1 hifd14 pe23/hifd14/rts1 f4 pe24 pe24/hifd15/cts1 hifd15 pe24/hifd15/cts1 l12 d00 ? d00 ? l13 d01 ? d01 ? l14 d02 ? d02 ? l15 d03 ? d03 ? k12 d04 ? d04 ? k13 d05 ? d05 ? k15 d06 ? d06 ? k14 d07 ? d07 ? f13 d08 ? d08 ? f12 d09 ? d09 ? g14 d10 ? d10 ? g15 d11 ? d11 ? h14 d12 ? d12 ? h15 d13 ? d13 ? h13 d14 ? d14 ? h12 d15 ? d15 ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 342 of 502 rej09b0239-0400 not hif boot mode hif boot mode pin no. initial function function settable by pfc initial function function settable by pfc m11 trst input ? trst input ? n11 tdo output ? tdo output ? r11 tdi input ? tdi input ? p11 tms input ? tms input ? n10 tck input ? tck input ? p13 extal input ? extal input ? r14 xtal output ? xtal output ? j15 ckio output ? ckio output ? r9 testout2 output ? testout2 output ? n12 asemd input ? asemd input ? r13 testmd input ? testmd input ? p9 md3 input ? md3 input ? j14 md2 input ? md2 input ? n15 md1 input ? md1 input ? r15 md0 input ? md0 input ? r12 res input ? res input ? p12 nmi input ? nmi input ? m10 md5 input ? md5 input ? n9 testout output ? testout output ?
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 343 of 502 rej09b0239-0400 14.1 register descriptions the pfc has the following registers. for details on the addresses of these registers and the states of these registers in each pr ocessing state, see section 18, list of registers. ? port a io register h (paiorh) ? port a control register h1 (pacrh1) ? port a control register h2 (pacrh2) ? port b io register l (pbiorl) ? port b control register l1 (pbcrl1) ? port b control register l2 (pbcrl2) ? port c io register h (pciorh) ? port c io register l (pciorl) ? port d io register l (pdiorl) ? port d control register l2 (pdcrl2) ? port e io register h (peiorh) ? port e io register l (peiorl) ? port e control register h1 (pecrh1) ? port e control register h2 (pecrh2) ? port e control register l1 (pecrl1) ? port e control register l2 (pecrl2) 14.1.1 port a io register h (paiorh) paiorh is a 16-bit readable/writable register that selects the input/output directions of the port a pins. bits pa25ior to pa16ior correspond to pins pa25 to pa16 (the pin name abbreviations for multiplexed functions are omitted). paiorh is enabled when a port a pin functions as a general input/output (pa25 to pa16), otherwise, disabled. setting a bit in paiorh to 1 makes the corresponding pin function as an output and clearing a bit in paiorh to 0 makes the pin function as an input. bits 15 to 10 in paiorh are reserved. these bits are always read as 0. the write value should always be 0. the initial value of paiorh is h'0000.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 344 of 502 rej09b0239-0400 14.1.2 port a control register h1 and h2 (pacrh1 and pacrh2) pacrh1 and pacrh2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port a pins. ? pacrh1 bit bit name initial value r/w description 15 to 3 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 2 pa25md0 0 r/w pa25 mode selects the function of pin pa25/a25. 0: pa25 input/output (port) 1: a25 output (bsc) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pa24md0 0 r/w pa24 mode selects the function of pin pa24/a24. 0: pa24 input/output (port) 1: a24 output (bsc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 345 of 502 rej09b0239-0400 ? pacrh2 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 pa23md0 0 r/w pa23 mode selects the function of pin pa23/a23. 0: pa23 input/output (port) 1: a23 output (bsc) 13 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 12 pa22md0 0 r/w pa22 mode selects the function of pin pa22/a22. 0: pa22 input/output (port) 1: a22 output (bsc) 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pa21md0 0 r/w pa21 mode selects the function of pin pa21/a21. 0: pa21 input/output (port) 1: a21 output (bsc) 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pa20md0 0 r/w pa20 mode selects the function of pin pa20/a20. 0: pa20 input/output (port) 1: a20 output (bsc) 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 346 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 pa19md0 0 r/w pa19 mode selects the function of pin pa19/a19. 0: pa19 input/output (port) 1: a19 output (bsc) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pa18md0 0 r/w pa18 mode selects the function of pin pa18/a18. 0: pa18 input/output (port) 1: a18 output (bsc) 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pa17md0 0 r/w pa17 mode selects the function of pin pa17/a17. 0: pa17 input/output (port) 1: a17 output (bsc) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pa16md0 0 r/w pa16 mode selects the function of pin pa16/a16. 0: pa16 input/output (port) 1: a16 output (bsc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 347 of 502 rej09b0239-0400 14.1.3 port b io register l (pbiorl) pbiorl is a 16-bit readable/writable register that selects the input/output directions of the port b pins. bits pb13ior to pb0ior correspond to pins pb13 to pb00 (the pin name abbreviations for multiplexed functions are omitted). pbiorl is enabled when a port b pin functions as a general input/output (pb13 to pb00), otherwise, disabled. setting a bit in pbiorl to 1 makes the corresponding pin function as an output and clearing a bit in pbiorl to 0 makes the pin function as an input. bits 15 and 14 in pbiorl are reserved. these bits are always read as 0. the write value should always be 0. the initial value of paibrl is h'0000. 14.1.4 port b control register l1 and l2 (pbcrl1 and pbcrl2) pbcrl1 and pbcrl2 are 16-bit readable/writable re gisters that select the pin functions for the multiplexed port b pins.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 348 of 502 rej09b0239-0400 ? pbcrl1 bit bit name initial value r/w description 15 to 11 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 10 pb13md0 0 r/w pb13 mode selects the function of pin pb13/ bs . 0: pb13 input/output (port) 1: bs output (bsc) 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pb12md0 0 r/w pb12 mode selects the function of pin pb12/ cs3 . 0: pb12 input/output (port) 1: cs3 output (bsc) 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 pb11md0 0 r/w pb11 mode selects the function of pin pb11/ cs4 . 0: pb11 input/output (port) 1: cs4 output (bsc) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pb10md0 0 r/w pb10 mode selects the function of pin pb10/ cs5b / ce1a . 0: pb10 input/output (port) 1: cs5b / ce1a output (bsc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 349 of 502 rej09b0239-0400 bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pb9md0 0 r/w pb9 mode selects the function of pin pb09/ ce2a . 0: pb09 input/output (port) 1: ce2a output (bsc) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pb8md0 0 r/w pb8 mode selects the function of pin pb08/ cs6b / ce1b . 0: pb13 input/output (port) 1: cs6b / ce1b output (bsc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 350 of 502 rej09b0239-0400 ? pbcrl2 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 pb7md0 0 r/w pb7 mode selects the function of pin pb07/ ce2b . 0: pb07 input/output (port) 1: ce2b output (bsc) 13 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 12 pb6md0 0 r/w pb6 mode selects the function of pin pb06/ iciowr . 0: pb06 input/output (port) 1: iciowr output (bsc) 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pb5md0 0 r/w pb5 mode selects the function of pin pb05/ iciord . 0: pb05 input/output (port) 1: iciord output (bsc) 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pb4md0 0 r/w pb4 mode selects the function of pin pb04/ ras . 0: pb04 input/output (port) 1: ras output (bsc) 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 351 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 pb3md0 0 r/w pb3 mode selects the function of pin pb03/ cas . 0: pb03 input/output (port) 1: cas output (bsc) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pb2md0 0 r/w pb2 mode selects the function of pin pb02/cke. 0: pb02 input/output (port) 1: cke output (bsc) 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pb1md0 0 r/w pb1 mode selects the function of pin pb01/ iois16 . 0: pb01 input/output (port) 1: iois16 input (bsc) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pb0md0 0 r/w pb0 mode selects the function of pin pb00/ wait . 0: pb00 input/output (port) 1: wait input (bsc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 352 of 502 rej09b0239-0400 14.1.5 port c io register h and l (pciorh and pciorl) pciorh and pciorl are 16-bit readable/writable re gisters that select the input/output directions of the port c pins. bits pc20ior to pc0ior correspond to pins pc20 to pc00 (the pin name abbreviations for multiplexed functions are om itted). pciorh is enabled when a port c pin functions as a general input/output (pc20 to pc16), otherwise, disabled. pciorl is enabled when a port c pin functions as a general input/output (pc15 to pc00), otherwise, disabled. setting a bit in pciorh and pciorl to 1 makes the corresponding pin function as an output and clearing a bit in pciorh and pciorl to 0 makes the pin function as an input. bits 15 to 5 in pciorh are reserved. these bits are always read as 0. the write value should always be 0. the initial values of pciorh and pciorl are h'0000. 14.1.6 port d io register l (pdiorl) pdiorl is a 16-bit readable/writable register that selects the input/output directions of the port d pins. bits pd7ior to pd0ior correspond to pins pd7 to pd0 (the pin name abbreviations for multiplexed functions are omitted). pdiorl is enabled when a port c pin functions as a general input/output (pd7 to pd0), otherwise, disabled. setting a bit in pdiorl to 1 makes the corresponding pin function as an output and clearing a bit in pdiorl to 0 makes the pin function as an input. bits 15 to 8 in pdiorl are reserved. these bits are always read as 0. the write value should always be 0. the initial value of pdiorl is h'0000.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 353 of 502 rej09b0239-0400 14.1.7 port d control register l2 (pdcrl2) pdcrl2 is a 16-bit readable/writable register that selects the pin functions for the multiplexed port b pins. ? pdcrl2 bit bit name initial value r/w description 15 14 pd7md1 pd7md0 0 0 r/w r/w pd7 mode selects the function of pin pd7/irq7/sck2. 00: pd7 input/output (port) 01: irq7 input (intc) 10: sck2 input/output (scif) 11: setting prohibited 13 12 pd6md1 pd6md0 0 0 r/w r/w pd6 mode selects the function of pin pd6/irq6/rxd2. 00: pd6 input/output (port) 01: irq6 input (intc) 10: rxd2 input (scif) 11: setting prohibited 11 10 pd5md1 pd5md0 0 0 r/w r/w pd5 mode selects the function of pin pd5/irq5/txd2. 00: pd5 input/output (port) 01: irq5 input (intc) 10: txd2 output (scif) 11: setting prohibited 9 8 pd4md1 pd4md0 0 0 r/w r/w pd4 mode selects the function of pin pd4/irq4/sck1. 00: pd4 input/output (port) 01: irq4 input (intc) 10: sck1 input/output (scif) 11: setting prohibited
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 354 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 pd3md1 pd3md0 0 0 r/w r/w pd3 mode selects the function of pin pd3/irq3/rxd1. 00: pd3 input/output (port) 01: irq3 input (intc) 10: rxd1 input (scif) 11: setting prohibited 5 4 pd2md1 pd2md0 0 0 r/w r/w pd2 mode selects the function of pin pd2/irq2/txd1. 00: pd2 input/output (port) 01: irq2 input (intc) 10: txd1 output (scif) 11: setting prohibited 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pd1md0 0 r/w pd1 mode selects the function of pin pd1/irq1. 0: pd1 input/output (port) 1: irq1 input (intc) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pd0md0 0 r/w pd0 mode selects the function of pin pd0/irq0. 0: pd0 input/output (port) 1: irq0 input (intc)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 355 of 502 rej09b0239-0400 14.1.8 port e io register h and l (peiorh and peiorl) peiorh and peiorl are 16-bit readable/writable regi sters that select the input/output directions of the port e pins. bits pe24ior to pe0ior correspond to pins pe24 to pe00 (the pin name abbreviations for multiplexed functions are omitt ed). peiorh is enabled when a port e pin functions as a general input/output (pe24 to pe16), otherwise, disabled. peiorl is enabled when a port e pin functions as a general input/output (pe15 to pe00), otherwise, disabled. setting a bit in peiorh and peiorl to 1 makes the corresponding pin function as an output and clearing a bit in peiorh and peiorl to 0 makes the pin function as an input. bits 15 to 9 in paiorh are reserved. these bits are always read as 0. the write value should always be 0. the initial values of peiorh and peiorl are h'0000. 14.1.9 port e control register h1, h2, l1 , and l2 (pecrh1, pecrh2, pecrl1, and pecrl2) pecrh1, pecrh2, pecrl1, and pecrl2 are 16-bit readable/writable registers that select the pin functions for the multiplexed port e pins. ? pecrh1 bit bit name initial value r/w description 15 to 2 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 1 0 pe24md1 pe24md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe24 mode selects the function of pin pe24/hifd15/cts1. 00: pe24 input/output (port) 01: hifd15 input/output (hif) 10: cts1 input (scif) 11: setting prohibited
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 356 of 502 rej09b0239-0400 ? pecrh2 bit bit name initial value r/w description 15 14 pe23md1 pe23md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe23 mode selects the function of pin pe23/hifd14/rts1. 00: pe23 input/output (port) 01: hifd14 input/output (hif) 10: rts1 input (scif) 11: setting prohibited 13 12 pe22md1 pe22md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe22 mode selects the function of pin pe22/hifd13/cts0. 00: pe22 input/output (port) 01: hifd13 input/output (hif) 10: cts0 input (scif) 11: setting prohibited 11 10 pe21md1 pe21md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe21 mode selects the function of pin pe21/hifd12/rts0. 00: pe21 input/output (port) 01: hifd12 input/output (hif) 10: rts0 output (scif) 11: setting prohibited 9 8 pe20md1 pe20md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe20 mode selects the function of pin pe20/hifd11/sck1. 00: pe20 input/output (port) 01: hifd11 input/output (hif) 10: sck1 input/output (scif) 11: setting prohibited
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 357 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 pe19md1 pe19md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe19 mode selects the function of pin pe19/hifd10/rxd1. 00: pe19 input/output (port) 01: hifd10 input/output (hif) 10: rxd1 output (scif) 11: setting prohibited 5 4 pe18md1 pe18md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe18 mode selects the function of pin pe18/hifd09/txd1. 00: pe18 input/output (port) 01: hifd09 input/output (hif) 10: txd1 output (scif) 11: setting prohibited 3 2 pe17md1 pe17md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe17 mode selects the function of pin pe17/hifd08/sck0. 00: pe17 input/output (port) 01: hifd08 input/output (hif) 10: sck0 input/output (scif) 11: setting prohibited 1 0 pe16md1 pe16md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe16 mode selects the function of pin pe16/hifd07/rxd0. 00: pe16 input/output (port) 01: hifd07 input/output (hif) 10: rxd0 input (scif) 11: setting prohibited
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 358 of 502 rej09b0239-0400 ? pecrl1 bit bit name initial value r/w description 15 14 pe15md1 pe15md0 0 0 (non-hif boot mode) 0 1 (hif boot mode) r/w r/w pe15 mode selects the function of pin pe15/hifd06/txd0. 00: pe15 input/output (port) 01: hifd06 input/output (hif) 10: txd0 output (scif) 11: setting prohibited 13 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 12 pe14md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe14 mode selects the function of pin pe14/hifd05. 0: pe14 input/output (port) 1: hifd05 input/output (hif) 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 10 pe13md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe13 mode selects the function of pin pe13/hifd04. 0: pe13 input/output (port) 1: hifd04 input/output (hif) 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 359 of 502 rej09b0239-0400 bit bit name initial value r/w description 8 pe12md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe12 mode selects the function of pin pe12/hifd03. 0: pe12 input/output (port) 1: hifd03 input/output (hif) 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 pe11md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe11 mode selects the function of pin pe11/hifd02. 0: pe11 input/output (port) 1: hifd02 input/output (hif) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pe10md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe10 mode selects the function of pin pe10/hifd01. 0: pe10 input/output (port) 1: hifd01 input/output (hif) 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pe9md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe9 mode selects the function of pin pe09/hifd00. 0: pe09 input/output (port) 1: hifd00 input/output (hif)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 360 of 502 rej09b0239-0400 bit bit name initial value r/w description 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pe8md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe8 mode selects the function of pin pe08/ hifcs . 0: pe08 input/output (port) 1: hifcs input (hif) ? pecrl2 bit bit name initial value r/w description 15 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 14 pe7md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe7 mode selects the function of pin pe07/hifrs. 0: pe07 input/output (port) 1: hifrs input (hif) 13 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 12 pe6md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe6 mode selects the function of pin pe06/ hifwr . 0: pe06 input/output (port) 1: hifwr input (hif) 11 ? 0 r reserved this bit is always read as 0. the write value should always be 0.
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 361 of 502 rej09b0239-0400 bit bit name initial value r/w description 10 pe5md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe5 mode selects the function of pin pe05/ hifrd . 0: pe05 input/output (port) 1: hifrd input (hif) 9 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 8 pe4md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe4 mode selects the function of pin pe04/ hifint . 0: pe04 input/output (port) 1: hifint output (hif) 7 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 6 pe3md0 1 r/w pe3 mode selects the function of pin pe03/hifmd. 0: pe03 input/output (port) 1: hifmd input (hif) 5 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 4 pe2md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe2 mode selects the function of pin pe02/hifdreq. 0: pe02 input/output (port) 1: hifdreq output (hif)
section 14 pin function controller (pfc) rev. 4.00 sep. 13, 2007 page 362 of 502 rej09b0239-0400 bit bit name initial value r/w description 3 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 2 pe1md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe1 mode selects the function of pin pe01/hifrdy. 0: pe01 input/output (port) 1: hifrdy output (hif) 1 ? 0 r reserved this bit is always read as 0. the write value should always be 0. 0 pe0md0 0 (non-hif boot mode) 1 (hif boot mode) r/w pe0 mode selects the function of pin pe00/hifebl. 0: pe00 input/output (port) 1: hifebl input (hif)
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 363 of 502 rej09b0239-0400 section 15 i/o ports this lsi has 26 ports (ports a, b, c, d, and e). port a, port b, port c, port d, and port e are 10- bit, 14-bit, 21-bit, 8-bit, and 25 -bit i/o port, respectively. the pins of each port except port c are multiplexed with other functions. the pin function controller (pfc) handles the selection of multiplex pin functions. each port has a data register to store data of pin. 15.1 port a port a of this lsi is an i/o port with ten pins as shown in figure 15.1. pa16 (input/output)/a16 (output) pa17 (input/output)/a17 (output) pa18 (input/output)/a18 (output) pa19 (input/output)/a19 (output) pa20 (input/output)/a20 (output) pa21 (input/output)/a21 (output) pa22 (input/output)/a22 (output) pa23 (input/output)/a23 (output) pa24 (input/output)/a24 (output) pa25 (input/output)/a25 (output) port a figure 15.1 port a 15.1.1 register description port a is a 10-bit i/o port that has a following register. for details on the address of this register and the states of this register in each processi ng state, see section 18 , list of registers. ? port a data register h (padrh) 15.1.2 port a data register h (padrh) padrh is a 16-bit readable/writable register which stores data for port a. bits pa25dr to pa16dr correspond to pins pa25 to pa16. (d escription of multiplexed functions is omitted.)
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 364 of 502 rej09b0239-0400 when the pin function is general output port, if the value is written to padrh, the value is output from the pin; if padrh is read, the value written to the register is directly read regardless of the pin state. when the pin function is general input port, not the value of register but pin state is directly read if padrh is read. data can be written to padrh but no effect on the pin state. table 15.1 shows the reading/writing function of the port a data register h. bit bit name initial value r/w description 15 to 10 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 9 pa25dr 0 r/w see table 15.1. 8 pa24dr 0 r/w 7 pa23dr 0 r/w 6 pa22dr 0 r/w 5 pa21dr 0 r/w 4 pa20dr 0 r/w 3 pa19dr 0 r/w 2 pa18dr 0 r/w 1 pa17dr 0 r/w 0 pa16dr 0 r/w table 15.1 port a data register h (padrh) read/write operation ? bits 9 to 0 in padrh pin function paiorh read write general input 0 pin state data can be written to padrh but no effect on the pin state. general output 1 padrh value written value is output from the pin. other functions * padrh value data can be written to padrh but no effect on the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 365 of 502 rej09b0239-0400 15.2 port b port b of this lsi is an i/o port wi th 14 pins as shown in figure 15.2. pb09 (input/output)/ ce2a (output) pb08 (input/output)/ cs6b (output)/ ce1b (output) pb07 (input/output)/ ce2b (output) pb06 (input/output)/ iciowr (output) pb05 (input/output)/ iciord (output) pb02 (input/output)/cke (output) pb03 (input/output)/ cas (output) pb04 (input/output)/ ras (output) pb01 (input/output)/ iois16 (input) pb00 (input/output)/ wait (input) pb10 (input/output)/ cs5b (output)/ ce1a (output) pb11 (input/output)/ cs4 (output) pb12 (input/output)/ cs3 (output) pb13 (input/output)/ bs (output) port b figure 15.2 port b 15.2.1 register description port b is a 14-bit i/o port that has a following regi ster. for details on the ad dress of this register and the states of this register in each processi ng state, see section 18 , list of registers. ? port b data register l (pbdrl) 15.2.2 port b data register l (pbdrl) pbdrl is a 16-bit readable/writable register which stores data for port b. bits pb13dr to pb0dr correspond to pins pb13 to pb00. (description of multiplexed functions is omitted.) when the pin function is general output port, if the value is written to pbdrl, the value is output from the pin; if pbdrl is read, the value written to the register is directly read regardless of the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 366 of 502 rej09b0239-0400 when the pin function is general input port, not the value of register but pin state is directly read if pbdrl is read. data can be written to pbdrl but no effect on the pin state. table 15.2 shows the reading/writing function of the port b data register l. bit bit name initial value r/w description 15 14 ? ? 0 0 r r reserved these bits are always read as 0. the write value should always be 0. 13 pb13dr 0 r/w see table 15.2. 12 pb12dr 0 r/w 11 pb11dr 0 r/w 10 pb10dr 0 r/w 9 pb9dr 0 r/w 8 pb8dr 0 r/w 7 pb7dr 0 r/w 6 pb6dr 0 r/w 5 pb5dr 0 r/w 4 pb4dr 0 r/w 3 pb3dr 0 r/w 2 pb2dr 0 r/w 1 pb1dr 0 r/w 0 pb0dr 0 r/w table 15.2 port b data register l (pbdrl) read/write operation ? bits 13 to 0 in pbdrl pin function pbiorl read write general input 0 pin state data can be written to pbdrl but no effect on the pin state. general output 1 pbdrl value writt en value is output from the pin. other functions * pbdrl value data can be written to pbdrl but no effect on the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 367 of 502 rej09b0239-0400 15.3 port c port c of this lsi is an i/o port wi th 21 pins as shown in figure 15.3. pc09 (input/output) pc08 (input/output) pc07 (input/output) pc06 (input/output) pc05 (input/output) pc02 (input/output) pc03 (input/output) pc04 (input/output) pc01 (input/output) pc00 (input/output) pc10 (input/output) pc11 (input/output) pc12 (input/output) pc13 (input/output) pc14 (input/output) pc15 (input/output) pc16 (input/output) pc17 (input/output) pc18 (input/output) port c pc19 (input/output) pc20 (input/output) figure 15.3 port c
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 368 of 502 rej09b0239-0400 15.3.1 register description port c is a 21-bit i/o port that has the following registers. for details on the addresses of these registers and the states of these re gisters in each processing state, see section 18, list of registers. ? port c data register h (pcdrh) ? port c data register l (pcdrl) 15.3.2 port c data registers h and l (pcdrh and pcdrl) pcdrh and pcdrl are 16-bit readable/writable registers that stores data for port c. bits pc20dr to pc0dr correspond to pins pc20 to pc00. (description of multiplexed functions is omitted.) when the pin function is general output port, if the value is written to pcdrh or pcdrl, the value is output from the pin; if pcdrh or pcdr l is read, the value written to the register is directly read regardle ss of the pin state. when the pin function is general input port, not the value of register but pin state is directly read if pcdrh or pcdrl is read. data can be written to pcdrh or pcdrl but no effect on the pin state. table 15.3 shows the reading/writing function of the port c data registers h and l. ? pcdrh bit bit name initial value r/w description 15 to 5 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 4 pc20dr 0 r/w see table 15.3. 3 pc19dr 0 r/w 2 pc18dr 0 r/w 1 pc17dr 0 r/w 0 pc16dr 0 r/w
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 369 of 502 rej09b0239-0400 ? pcdrl bit bit name initial value r/w description 15 pc15dr 0 r/w see table 15.3. 14 pc14dr 0 r/w 13 pc13dr 0 r/w 12 pc12dr 0 r/w 11 pc11dr 0 r/w 10 pc10dr 0 r/w 9 pc9dr 0 r/w 8 pc8dr 0 r/w 7 pc7dr 0 r/w 6 pc6dr 0 r/w 5 pc5dr 0 r/w 4 pc4dr 0 r/w 3 pc3dr 0 r/w 2 pc2dr 0 r/w 1 pc1dr 0 r/w 0 pc0dr 0 r/w table 15.3 port c data registers h and l (pcdrh and pcdrl) read/write operation ? bits 4 to 0 in pcdrh and bits 15 to 0 in pcdrl pin function pbiorl read write general input 0 pin state data can be written to pcdrh or pcdrl but no effect on the pin state. general output 1 pcdrh or pcdrl value written value is output from the pin. other functions * pcdrh or pcdrl value data can be written to pcdrh or pcdrl but no effect on the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 370 of 502 rej09b0239-0400 15.4 port d port d of this lsi is an i/o port with eight pins as shown in figure 15.4. pd0 (input/output)/rq0 (input) pd1 (input/output)/irq1 (input) pd2 (input/output)/irq2 (input)/txd1 (output) pd3 (input/output)/irq3 (input)/rxd1 (input) pd4 (input/output)/irq4 (input)/sck1 (input/output) pd5 (input/output)/irq5 (input)/txd2 (output) pd6 (input/output)/irq6 (input)/rxd2 (input) pd7 (input/output)/irq7 (input)/sck2 (input/output) port b figure 15.4 port d 15.4.1 register description port d is an 8-bit i/o port that has a following register. for details on the address of this register and the states of this register in each processi ng state, see section 18 , list of registers. ? port d data register l (pddrl) 15.4.2 port d data register l (pddrl) pddrl is a 16-bit readable/writable register which stores data for port d. bits pd7dr to pd0dr correspond to pins pd7 to pd0. (descripti on of multiplexed functions is omitted.) when the pin function is general output port, if the value is written to pddrl, the value is output from the pin; if pddrl is read, the value written to the register is directly read regardless of the pin state. when the pin function is general input port, not the value of register but pin state is directly read if pddrl is read. data can be written to pddrl but no effect on the pin state. table 15.4 shows the reading/writing function of the port d data register l.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 371 of 502 rej09b0239-0400 bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 pd7dr 0 r/w see table 15.4. 6 pd6dr 0 r/w 5 pd5dr 0 r/w 4 pd4dr 0 r/w 3 pd3dr 0 r/w 2 pd2dr 0 r/w 1 pd1dr 0 r/w 0 pd0dr 0 r/w table 15.4 port d data register l (pddrl) read/write operation ? bits 7 to 0 in pddrl pin function pbiorl read write general input 0 pin state data can be written to pddrl but no effect on the pin state. general output 1 pddrl value writt en value is output from the pin. other functions * pddrl value data can be written to pddrl but no effect on the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 372 of 502 rej09b0239-0400 15.5 port e port e of this lsi is an i/o port with 25 pins as shown in figure 15.5. port e pe00 (input/output)/hifebl (input) pe01 (input/output)/hifrdy (output) pe02 (input/output)/hifdreq (output) pe03 (input/output)/hifmd (input) pe04 (input/output)/ hifint (output) pe05 (input/output)/ hifrd (input) pe06 (input/output)/ hifwr (input) pe07 (input/output)/hifrs (input) pe08 (input/output)/ hifcs (input) pe09 (input/output)/hifd00 (input/output) pe10 (input/output)/hifd01 (input/output) pe11 (input/output)/hifd02 (input/output) pe12 (input/output)/hifd03 (input/output) pe13 (input/output)/hifd04 (input/output) pe14 (input/output)/hifd05 (input/output) pe15 (input/output)/hifd06 (input/output)/txd0 (output) pe16 (input/output)/hifd07 (input/output)/rxd0 (input) pe17 (input/output)/hifd08 (input/output)/sck0 (input/output) pe18 (input/output)/hifd09 (input/output)/txd1 (output) pe19 (input/output)/hifd10 (input/output)/rxd1 (input) pe20 (input/output)/hifd11 (input/output)/sck1 (input/output) pe21 (input/output)/hifd12 (input/output)/rts0 (output) pe22 (input/output)/hifd13 (input/output)/cts0 (input) pe23 (input/output)/hifd14 (input/output)/rts1 (output) pe24 (input/output)/hifd15 (input/output)/cts1 (input) figure 15.5 port e
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 373 of 502 rej09b0239-0400 15.5.1 register description port e is a 25-bit i/o port that has the following registers. for details on the addresses of these registers and the states of these re gisters in each processing state, see section 18, list of registers. ? port e data register h (pedrh) ? port e data register l (pedrl) 15.5.2 port e data registers h and l (pedrh and pedrl) pedrh and pedrl are 16-bit readable/writable registers that store data for port e. bits pe24dr to pe0dr correspond to pins pe24 to pe00. (description of multiplexed functions is omitted.) when the pin function is general output port, if the value is written to pedrh or pedrl, the value is output from the pin; if pedrh or pedr l is read, the value written to the register is directly read regardle ss of the pin state. when the pin function is general input port, not the value of register but pin state is directly read if pedrh or pedrl is read. data can be written to pedrh or pedrl but no effect on the pin state. table 15.5 shows the reading/writing function of the port e data registers h and l. ? pedrh bit bit name initial value r/w description 15 to 9 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 8 pe24dr 0 r/w see table 15.5. 7 pe23dr 0 r/w 6 pe22dr 0 r/w 5 pe21dr 0 r/w 4 pe20dr 0 r/w 3 pe19dr 0 r/w 2 pe18dr 0 r/w 1 pe17dr 0 r/w 0 pe16dr 0 r/w
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 374 of 502 rej09b0239-0400 ? pedrl bit bit name initial value r/w description 15 pe15dr 0 r/w see table 15.5. 14 pe14dr 0 r/w 13 pe13dr 0 r/w 12 pe12dr 0 r/w 11 pe11dr 0 r/w 10 pe10dr 0 r/w 9 pe9dr 0 r/w 8 pe8dr 0 r/w 7 pe7dr 0 r/w 6 pe6dr 0 r/w 5 pe5dr 0 r/w 4 pe4dr 0 r/w 3 pe3dr 0 r/w 2 pe2dr 0 r/w 1 pe1dr 0 r/w 0 pe0dr 0 r/w table 15.5 port e data re gisters h, l (pedrh, pedr l) read/write operation ? bits 8 to 0 in pedrh and bits 15 to 0 in pedrl pin function pbiorl read write general input 0 pin state data can be written to pedrh or pedrl but no effect on the pin state. general output 1 pedrh or pedrl value written value is output from the pin. other functions * pedrh or pedrl value data can be written to pedrh or pedrl but no effect on the pin state.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 375 of 502 rej09b0239-0400 15.6 usage note 1. when pins multiplexed with general i/o is used as output pins for other functions, these pins work as general output pins for the period of 1 t pcyc synchronized with internal power-on reset by wdt overflow. for example, when the pin pb12/ cs3 works as cs3 and the pb12dr bit in pbdrl is set to 0, the pin is driven low for the period of 1 t pcyc and may cause memory malfunction. to prevent this, port registers that correspond to pins used for the strobe output must be set to strobe non-active level. this does not apply to the power-on reset from the res pin.
section 15 i/o ports rev. 4.00 sep. 13, 2007 page 376 of 502 rej09b0239-0400
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 377 of 502 rej09b0239-0400 section 16 user break controller (ubc) the user break controller (ubc) provides functions that simplify program debugging. these functions make it easy to design an effective self-monitoring debugger, enabling the chip to debug programs without using an in-circuit emulator. break conditions that can be set in the ubc are instruction fetch or data read/write access, data si ze, data contents, address value, and stop timing in the case of instruction fetch. 16.1 features the ubc has the following features: ? the following break comparison conditions can be set. number of break channels: two channels (channels a and b) user break can be requested as either the independent or sequential condition on channels a and b (sequential break: when channel a and channel b match with break conditions in the different bus cycles in that orde r, a break condition is satisfied). ? address (compares addresses 32 bits): comparison bits are maskable in 1-bit units; user can mask addresses at lower 12 bits (4-k page), lower 10 bits (1-k page), or any size of page, etc. one of the two address buses (l-bus address (lab) and i-bus address (iab)) can be selected. ? data (only on channel b, 32-bit maskable) one of the two data buses (logic data bus (ldb) and internal data bus (idb)) can be selected. ? bus cycle: instruction fetch or data access ? read/write ? operand size: byte, word, or longword ? user break interrupt is generated upon satisfying break conditions. a user-designed user-break condition interrupt exception processing routine can be run. ? in an instruction fetch cycle, it can be selected that a break is set before or after an instruction is executed. ? maximum repeat times for the break condition (only for channel b): 2 12 ? 1 times. ? four pairs of branch source/destination buffers.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 378 of 502 rej09b0239-0400 figure 16.1 shows a block diagram of the ubc. bbra bara bamra cpu state signal iab lab mdb access comparator address comparator channel a access comparator address comparator data comparator pc trace control channel b bbrb betr barb bamrb bbrb bdmrb brsr brdr brcr user break request ubc location ldb/idb access control bbra: break bus cycle register a bara: break address register a bamra: break address mask register a bbrb: break bus cycle register b barb: break address register b bamrb: break address mask register b bdrb: break data register b bdmrb: break data mask register b betr: execution times break register brsr: branch source register brdr: branch destination register brcr: break control register [legend] figure 16.1 block diagram of ubc
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 379 of 502 rej09b0239-0400 16.2 register descriptions the user break controller has the following regist ers. for details on register addresses and access sizes, refer to section 18, list of registers. ? break address register a (bara) ? break address mask register a (bamra) ? break bus cycle register a (bbra) ? break address register b (barb) ? break address mask register b (bamrb) ? break bus cycle register b (bbrb) ? break data register b (bdrb) ? break data mask register b (bdmrb) ? break control register (brcr) ? execution times break register (betr) ? branch source register (brsr) ? branch destination register (brdr) 16.2.1 break address register a (bara) bara is a 32-bit readable/writable register. bara specifies the addr ess used for a break condition in channel a. bit bit name initial value r/w description 31 to 0 baa31 to baa 0 all 0 r/w break address a store the address on the la b or iab specifying break conditions of channel a.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 380 of 502 rej09b0239-0400 16.2.2 break address ma sk register a (bamra) bamra is a 32-bit readable/writable register. bamr a specifies bits masked in the break address specified by bara. bit bit name initial value r/w description 31 to 0 bama31 to bama 0 all 0 r/w break address mask a specify bits masked in the channel a break address bits specified by bara (baa31 to baa0). 0: break address bit baan of channel a is included in the break condition 1: break address bit baan of channel a is masked and is not included in the break condition note: n = 31 to 0 16.2.3 break bus cycl e register a (bbra) break bus cycle register a (bbra) is a 16-bit read able/writable register, which specifies (1) l bus cycle or i bus cycle, (2) instruc tion fetch or data access, (3) read or write, and (4) operand size in the break conditions of channel a. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 6 cda1 cda0 0 0 r/w r/w l bus cycle/i bus cycle select a select the l bus cycle or i bus cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the l bus cycle 10: the break condition is the i bus cycle 11: the break condition is the l bus cycle
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 381 of 502 rej09b0239-0400 bit bit name initial value r/w description 5 4 ida1 ida0 0 0 r/w r/w instruction fetch/data access select a select the instruction fetch cycle or data access cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the instruction fetch cycle 10: the break condition is the data access cycle 11: the break condition is th e instruction fetch cycle or data access cycle 3 2 rwa1 rwa0 0 0 r/w r/w read/write select a select the read cycle or write cycle as the bus cycle of the channel a break condition. 00: condition comparison is not performed 01: the break condition is the read cycle 10: the break condition is the write cycle 11: the break condition is the read cycle or write cycle 1 0 sza1 sza0 0 0 r/w r/w operand size select a select the operand size of the bus cycle for the channel a break condition. 00: the break condition does not include operand size 01: the break condition is byte access 10: the break condition is word access 11: the break condition is longword access 16.2.4 break addres s register b (barb) barb is a 32-bit readable/writable register. barb specifies the addr ess used for a break condition in channel b. bit bit name initial value r/w description 31 to 0 bab31 to bab 0 all 0 r/w break address b stores an address of lab or iab which specifies a break condition in channel b.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 382 of 502 rej09b0239-0400 16.2.5 break address ma sk register b (bamrb) bamrb is a 32-bit readable/writable register. bam rb specifies bits masked in the break address specified by barb. bit bit name initial value r/w description 31 to 0 bamb31 to bamb 0 all 0 r/w break address mask b specifies bits masked in the break address of channel b specified by barb (bab31 to bab0). 0: break address babn of channel b is included in the break condition 1: break address babn of channel b is masked and is not included in the break condition note: n = 31 to 0 16.2.6 break data register b (bdrb) bdrb is a 32-bit readable/writable register. bd br selects data used for a break condition in channel b. bit bit name initial value r/w description 31 to 0 bdb31 to bdb 0 all 0 r/w break data bit b stores data which specifies a break condition in channel b. bdrb specifies the break data on ldb or idb. notes: 1. specify an operand size when including t he value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 to 8 and 7 to 0 in bdrb as the break data.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 383 of 502 rej09b0239-0400 16.2.7 break data mask register b (bdmrb) bdmrb is a 32-bit readable/writable register. bdmrb specifies bits masked in the break data specified by bdrb. bit bit name initial value r/w description 31 to 0 bdmb31 to bdmb 0 all 0 r/w break data mask b specifies bits masked in the break data of channel b specified by bdrb (bdb31 to bdb0). 0: break data bdbn of channel b is included in the break condition 1: break data bdbn of channel b is masked and is not included in the break condition note: n = 31 to 0 notes: 1. specify an operand size when including the value of the data bus in the break condition. 2. when the byte size is selected as a break condition, the same byte data must be set in bits 15 ? 8 and 7 ? 0 in bdmrb as the break mask data. 16.2.8 break bus cycl e register b (bbrb) break bus cycle register b (bbrb) is a 16-bit read able/writable register, which specifies (1) l bus cycle or i bus cycle, (2) instruct ion fetch or data access, (3) read or write, and (4) operand size in the break conditions of channel b. bit bit name initial value r/w description 15 to 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 384 of 502 rej09b0239-0400 bit bit name initial value r/w description 7 6 cdb1 cdb0 0 0 r/w r/w l bus cycle/i bus cycle select b select the l bus cycle or i bus cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the l bus cycle 10: the break condition is the i bus cycle 11: the break condition is the l bus cycle 5 4 idb1 idb0 0 0 r/w r/w instruction fetch/data access select b select the instruction fetch cy cle or data access cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the instruction fetch cycle 10: the break condition is the data access cycle 11: the break condition is the instruction fetch cycle or data access cycle 3 2 rwb1 rwb0 0 0 r/w r/w read/write select b select the read cycle or write cycle as the bus cycle of the channel b break condition. 00: condition comparison is not performed 01: the break condition is the read cycle 10: the break condition is the write cycle 11: the break condition is the read cycle or write cycle 1 0 szb1 szb0 0 0 r/w r/w operand size select b select the operand size of the bus cycle for the channel b break condition. 00: the break condition does not include operand size 01: the break condition is byte access 10: the break condition is word access 11: the break condition is longword access
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 385 of 502 rej09b0239-0400 16.2.9 break control register (brcr) brcr sets the following conditions: ? channels a and b are used in two independent channel conditions or under the sequential condition. ? a break is set before or after instruction execution. ? specify whether to include th e number of execution times on channel b in comparison conditions. ? specify whether to include data bus on channel b in comparison conditions. ? enable pc trace. the break control register (brcr) is a 32-bit read able/writable register that has break conditions match flags and bits for setting a variety of break conditions. bit bit name initial value r/w description 31 to 16 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 15 scmfca 0 r/w l bus cycle condition match flag a when the l bus cycle condition in the break conditions set for channel a is satisfied, this flag is set to 1 (not cleared to 0). in order to clear this flag, write 0 into this bit. 0: the l bus cycle conditio n for channel a does not match 1: the l bus cycle conditio n for channel a matches 14 scmfcb 0 r/w l bus cycle condition match flag b when the l bus cycle condition in the break conditions set for channel b is satisfied, this flag is set to 1 (not cleared to 0). in order to clear this flag, write 0 into this bit. 0: the l bus cycle conditio n for channel b does not match 1: the l bus cycle conditio n for channel b matches
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 386 of 502 rej09b0239-0400 bit bit name initial value r/w description 13 scmfda 0 r/w i bus cycle condition match flag a when the i bus cycle condition in the break conditions set for channel a is satisfied, this flag is set to 1 (not cleared to 0). in order to clear this flag, write 0 into this bit. 0: the i bus cycle condition for channel a does not match 1: the i bus cycle condition for channel a matches 12 scmfdb 0 r/w i bus cycle condition match flag b when the i bus cycle condition in the break conditions set for channel b is satisfied, this flag is set to 1 (not cleared to 0). in order to clear this flag, write 0 into this bit. 0: the i bus cycle condition for channel b does not match 1: the i bus cycle condition for channel b matches 11 pcte 0 r/w pc trace enable 0: disables pc trace 1: enables pc trace 10 pcba 0 r/w pc break select a selects the break timing of th e instruction fetch cycle for channel a as before or after instruction execution. 0: pc break of channel a is set before instruction execution 1: pc break of channel a is set after instruction execution 9, 8 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 7 dbeb 0 r/w data break enable b selects whether or not the data bus condition is included in the break condition of channel b. 0: no data bus condition is included in the condition of channel b 1: the data bus condition is included in the condition of channel b
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 387 of 502 rej09b0239-0400 bit bit name initial value r/w description 6 pcbb 0 r/w pc break select b selects the break timing of th e instruction fetch cycle for channel b as before or after instruction execution. 0: pc break of channel b is set before instruction execution 1: pc break of channel b is set after instruction execution 5, 4 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 3 seq 0 r/w sequence condition select selects two conditions of channels a and b as independent or sequential conditions. 0: channels a and b are compared under independent conditions 1: channels a and b are compared under sequential conditions (channel a, then channel b) 2, 1 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 0 etbe 0 r/w number of execution times break enable enables the execution-times break condition only on channel b. if this bit is 1 (break enable), a user break is issued when the number of break conditions matches with the number of execution ti mes that is specified by betr. 0: the execution-times break condition is disabled on channel b 1: the execution-times break condition is enabled on channel b 16.2.10 execution times break register (betr) betr is a 16-bit readable/writable register. when the execution-times break condition of channel b is enabled, this register specifies the numb er of execution times to make the break. the maximum number is 2 12 ? 1 times. every time the break c ondition is satisfied, betr is
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 388 of 502 rej09b0239-0400 decremented by 1. a break is i ssued when the break condition is satisfied after betr becomes h'0001. bit bit name initial value r/w description 15 to 12 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 11 to 0 bet11 to bet0 all 0 r/w number of execution times 16.2.11 branch source register (brsr) brsr is a 32-bit read-only register. brsr stores bits 27 to 0 in the address of the branch source instruction. brsr has the flag bit that is set to 1 when a branch occurs. this flag bit is cleared to 0 when brsr is read, the setting to enable pc trace is made, or brsr is initialized by a power-on reset. other bits are not initialized by a power-o n reset. the four brsr registers have a queue structure and a stored register is shifted at every branch. bit bit name initial value r/w description 31 svf 0 r brsr valid flag indicates whether or not the branch source address is stored. when a branch is made, this flag is set to 1. this flag is cleared to 0 by one of the following conditions: when this flag is read from this register, when pc trace is enabled, and when a power-on reset is generated. 0: the value of brsr register is invalid 1: the value of brsr register is valid 30 to 28 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 27 to 0 bsa27 to bsa0 undefined r branch source address store bits 27 to 0 of the branch source address.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 389 of 502 rej09b0239-0400 16.2.12 branch destination register (brdr) brdr is a 32-bit read-only register. brdr stores bits 27 to 0 in the address of the branch destination instruction. brdr has the flag bit that is set to 1 when a branch occurs. this flag bit is cleared to 0 when brdr is read, the setting to enab le pc trace is made, or brdr is initialized by a power-on reset. other bits are not initialized by a power-on reset. the four brdr registers have a queue structure and a stored regi ster is shifted at every branch. bit bit name initial value r/w description 31 dvf 0 r brdr valid flag indicates whether or not the branch source address is stored. when a branch is made, this flag is set to 1. this flag is cleared to 0 by one of the following conditions: when this flag is read from this register, when pc trace is enabled, and when a power-on reset is generated. 0: the value of brdr register is invalid 1: the value of brdr register is valid 30 to 28 ? all 0 r reserved these bits are always read as 0. the write value should always be 0. 27 to 0 bda27 to bda0 undefined r branch destination address store bits 27 to 0 of the branch destination address.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 390 of 502 rej09b0239-0400 16.3 operation 16.3.1 flow of user break operation the flow from setting of break conditions to user break exception processing is described below: 1. the break addresses are set in the break address registers (bara and barb). the masked addresses are set in th e break address mask registers (b amra and bamrb). the break data is set in the break data register (bdrb). the mask ed data is set in the break data mask register (bdmrb). the bus break conditions are set in the break bus cycle registers (bbra and bbrb). there are three control bit combinations in both bbra and bbrb: bits to select l- bus cycle or i-bus cycle, bits to select instruction fetch or data acce ss, and bits to select read or write. no user break will be generated if one of these combinations is set to b'00. the respective conditions are set in the bits of the br eak control register (brcr). make sure to set all registers related to breaks before setting bbra/bbrb. 2. when the break conditions are satisfied, the ubc sends a user break request to the cpu and sets the l bus condition match flag (scmfca or scmfcb) and the i bus condition match flag (scmfda or scmfdb) for the appropriate channel. 3. the appropriate condition match flags (s cmfca, scmfda, scmfcb, and scmfdb) can be used to check if the set conditions match or not. the matching of the conditions sets flags. reset the flags by writing 0 before they are used again. 4. there is a chance that the data access break and its following instruction fetch break occur around the same time, there will be only one br eak request to the cpu, but these two break channel match flags could be both set.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 391 of 502 rej09b0239-0400 16.3.2 break on inst ruction fetch cycle 1. when l bus/instruction fetch/read/word or lo ngword is set in the break bus cycle register (bbra/bbrb), the break condition becomes the l bus instruction fetch cycle. whether it breaks before or after the execution of the instruction can then be selected with the pcba/pcbb bit of the break cont rol register (brcr) for the appropriate channel. if an instruction fetch cycle is set as a break condi tion, clear lsb in the break address register (bara/barb) to 0. a break cannot be generated as long as this bit is set to 1. 2. if the condition is matched while a break before execution is selected, a break is generated when it is confirmed that the instruction has been fetched and it will be executed. this means this feature cannot be used on instructions fetched by overrun (instructions fetched at a branch or during an interrupt transition, but not to be ex ecuted). when this kind of break is set in the delay slot of a delayed branch instruction, the break is generated immediately before the execution of the instruc tion that first accepts the break. meanwhile, a break before the execution of the instruction in a delay slot and a break after the execution of the sleep instruction are also prohibited. 3. when a break after execution is selected, the instruction that matche s the break condition is executed and then the break is generated prior to the execution of the next instruction. as with a break before execution, this cannot be used with overrun fetch instructions. when this kind of break is set for a delayed branch instruction, a break is not generated until the first instruction at which breaks are accepted. 4. when an instruction fetch cycle is set for channel b, the break data register b (bdrb) is ignored. there is thus no need to set break data for the break of the instruction fetch cycle. 16.3.3 break on data access cycle ? the bus cycles in which l bus data acces s breaks occur are from instructions. ? the relationship between the data access cycle ad dress and the comparis on condition for each operand size is listed in table 16.1. table 16.1 data access cycle addresses and operand size comparison conditions access size address compared longword compares break address register bits 31 to 2 to address bus bits 31 to 2 word compares break address register bits 31 to 1 to address bus bits 31 to 1 byte compares break address register bits 31 to 0 to address bus bits 31 to 0
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 392 of 502 rej09b0239-0400 this means that when address h'00001003 is set in the break address register (bara or barb), for example, the bus cycle in which th e break condition is satisfied is as follows (where other conditions are met). ? longword access at h'00001000 ? word access at h'00001002 ? byte access at h'00001003 ? when the data value is included in the break conditions on channel b: when the data value is included in the break conditions, either longword, word, or byte is specified as the operand size of the break bus cycle registers (bbra and bbrb). in this case, a break is generated when the address conditions and data conditions both match. to specify byte data for this case, set the same data in two bytes at bits 15 to 8 and bits 7 to 0 of the break data register b (bdrb) and break data mask register b (bdmrb). when word or byte is set, bits 31 to 16 of bdrb and bdmrb are ignored. 16.3.4 sequential break ? by setting the seq bit in brcr to 1, the sequential break is issued when a channel b break condition matches after a channel a break conditio n matches. a user break is not generated even if a channel b break condition matches before a channel a break condition matches. when channels a and b break conditions match at the same time, the sequential break is not issued. to clear the channel a condition match when a channel a condition match has occurred but a channel b condition match has not yet occurred in a sequential break specification, clear the seq bit in brcr to 0. ? in sequential break specification, the l- or i-bus can be selected and the execution times break condition can be also specified . for example, when the executi on times break condition is specified, the break is generated when a channel b condition matches with betr = h'0001 after a channel a condition has matched. 16.3.5 value of saved program counter (pc) when a break occurs, pc is saved onto the stack. the pc value saved is as follows depending on the type of break. ? when a break before execution is selected: the value of the program counter (pc) saved is the address of the instruction that matches the break condition. the fetched instruction is no t executed, and a break occurs before it.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 393 of 502 rej09b0239-0400 ? when a break after execution is selected: the pc value saved is the address of the instruc tion to be executed following the instruction in which the break condition matches. the fetched instruction is executed, and a break occurs before the execution of the next instruction. ? when an address in a data access cycle is specified as a break condition: the pc value is the address of the instruction to be executed following the instruction that matched the break condition. the instruction that matched the condition is executed and the break occurs before the next instruction is executed. ? when an address and data in a data access cycle are specified as a break condition: the pc value is the start address of the instruc tion that follows the instruction already executed when break processing started. when a data value is added to the break conditions, the break will occur before the execution of an instruction that is within two instructions of the instruction that matched the break condition. therefore, where the break will occur cannot be specified exactly. 16.3.6 pc trace ? setting pcte in brcr to 1 enables pc traces. when branch (branch instruction, and interrupt) is generated, the branch source addres s and branch destination address are stored in brsr and brdr, respectively. ? the branch source address has different values due to the kind of branch. ? branch instruction the branch instruction address. ? interrupt and exception the address of the in struction in which the interrupt or exception was accepted. this address is equal to the return address saved onto the stack. the start address of the interrupt or excepti on handling routine is stored in brdr. the trapa instruction belongs to interrupt and exception above. ? brsr and brdr have four pairs of queue structur es. the top of queues is read first when the address stored in the pc trace register is read. brsr and brdr share the read pointer. read brsr and brdr in order, the queue only shif ts after brdr is read. after switching the pcte bit (in brcr) off and on, the values in the queues are invalid.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 394 of 502 rej09b0239-0400 16.3.7 usage examples break condition specified for l bus instruction fetch cycle: ? register specifications bara = h'00000404, bamra = h'00000000, bbra = h'0054, barb = h'00008010, bamrb = h'00000006, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00300400 specified conditions: channel a/channel b independent mode ? channel a address: h'00000404, address mask: h'00000000 bus cycle: l bus/instruction fetch (after inst ruction execution)/read (operand size is not included in the condition) ? channel b address: h'00008010, address mask: h'00000006 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fe tch (before instruction executi on)/read (operand size is not included in the condition) a user break occurs after an instruction of address h'00000404 is executed or before instructions of addresses h'00008010 to h'00008016 are executed. ? register specifications bara = h'00037226, bamra = h'00000000 , bbra = h'0056, barb = h'0003722e, bamrb = h'00000000, bbrb = h'0056, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000008 specified conditions: channel a/channel b sequential mode ? channel a address: h'00037226, address mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction ex ecution)/read/word ? channel b address: h'0003722e, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction execution)/read/word after address h'00037226 is executed, a user break occurs before an instruction of address h'0003722e is executed.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 395 of 502 rej09b0239-0400 ? register specifications bara = h'00027128, bamra = h'000000 00, bbra = h'005a, barb = h'00031415, bamrb = h'00000000, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00300000 specified conditions: channel a/channel b independent mode ? channel a address: h'00027128, address mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction ex ecution)/write/word the asid check is not included. ? channel b address: h'00031415, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fe tch (before instruction executi on)/read (operand size is not included in the condition) on channel a, no user break occurs since instru ction fetch is not a write cycle. on channel b, no user break occurs since instruction fetch is performed for an even address. ? register specifications bara = h'00037226, bamra = h'000000 00, bbra = h'005a, barb = h'0003722e, bamrb = h'00000000, bbrb = h'0056, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000008 specified conditions: channel a/channel b sequential mode ? channel a address: h'00037226, address mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction ex ecution)/write/word ? channel b address: h'0003722e, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (b efore instruction execution)/read/word since instruction fetch is not a write cycle on channel a, a sequential condition does not match. therefore, no user break occurs. ? register specifications bara = h'00000500, bamra = h'00000000, bbra = h'0057, barb = h'00001000, bamrb = h'00000000, bbrb = h'0057, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00300001, betr = h'0005 specified conditions: channel a/channel b independent mode
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 396 of 502 rej09b0239-0400 ? channel a address: h'00000500, address mask: h'00000000 bus cycle: l bus/instruction fetch (bef ore instruction execu tion)/read/longword the asid check is not included. ? channel b address: h'00001000, address mask: h'00000000 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (bef ore instruction execu tion)/read/longword the number of exec ution-times break enable (5 times) on channel a, a user break occurs before an instruction of address h'00000500 is executed. on channel b, a user break occurs after the instruction of address h'00001000 are executed four times and before the fifth time. ? register specifications bara = h'00008404, bamra = h'00000fff, bbra = h' 0054, barb = h'00008010, bamrb = h'00000006, bbrb = h'0054, bdrb = h'00000000, bdmrb = h'00000000, brcr = h'00000400 specified conditions: channel a/channel b independent mode ? channel a address: h'000 08404, address mask: h'00000fff bus cycle: l bus/instruction fetch (after inst ruction execution)/read (operand size is not included in the condition) ? channel b address: h'00008010, address mask: h'00000006 data: h'00000000, data mask: h'00000000 bus cycle: l bus/instruction fetch (before in struction execution)/read (operand size is not included in the condition) a user break occurs after an instruction of addresses h'00008000 to h'00008ffe is executed or before an instruction of addresses h'00008010 to h'00008016 is executed. break condition specified fo r l bus data access cycle: ? register specifications bara = h'00123456, bamra = h'00000000 , bbra = h'0064, barb = h'000abcde, bamrb = h'000000ff, bbrb = h'006a, bdrb = h'0000a512, bdmrb = h'00000000, brcr = h'00000080 specified conditions: channel a/channel b independent mode
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 397 of 502 rej09b0239-0400 ? channel a address: h'00123456, address mask: h'00000000, asid = h'80 bus cycle: l bus/data access/ read (operand size is not included in the condition) ? channel b address: h'000abcde, address mask: h'000000ff data: h'0000a512, data mask: h'00000000 bus cycle: l bus/da ta access/write/word on channel a, a user break occurs with longword read from address h'00123454, word read from address h'00123456, or byte read from address h'00123456. on channel b, a user break occurs when word h'a512 is written in addresses h'000abc00 to h'000abcfe. break condition specified fo r i bus data access cycle: ? register specifications: bara = h'00314156, bamra = h'00000000, bbra = h'0094, barb = h'00055555, bamrb = h'00000000, bbrb = h'00a9, bdrb = h'00007878, bdmrb = h'00000f0f, brcr = h'00000080 specified conditions: channel a/channel b independent mode ? channel a address: h'00314156, address mask: h'00000000, asid = h'80 bus cycle: i bus/instruction fetch/read (opera nd size is not included in the condition) ? channel b address: h'00055555, address mask: h'00000000, asid = h'70 data: h'00000078, data mask: h'0000000f bus cycle: i bus/data access/write/byte on channel a, a user break occurs when instruction fetch is performed for address h'00314156 in the memory space. on channel b, a user break occurs when th e i bus writes byte data h'7* in address h'00055555. 16.3.8 usage notes 1. the cpu can read from or write to the ubc re gisters via the i bus. accordingly, during the period from executing an instruction to rewrite the ubc register till the new value is actually rewritten, the desired break may not occur. in or der to know the timing when the ubc register is changed, read from the last written register. instructions after then are valid for the newly written register value.
section 16 user break controller (ubc) rev. 4.00 sep. 13, 2007 page 398 of 502 rej09b0239-0400 2. ubc cannot monitor access to the l bu s and i bus in the same channel. 3. note on specification of sequential break: a condition match occurs when a b-channel match occurs in a bus cycle after an a-channel match occurs in another bus cycle in sequential break setting. therefore, no break occurs even if a bus cycle, in which an a-channel match and a b-channel match occur simultaneously, is set. 4. when a user break and another exception occu r at the same instruction, which has higher priority is determined according to the priority levels defined in table 5.1 in section 5, exception handling. if an exception with higher priority occurs, the user break is not generated. ? pre-execution break has the highest priority. ? when a post-execution break or data access break occurs simultaneously with a re- execution-type exception (includi ng pre-execution break) that has higher priority, the re- execution-type exception is a ccepted, and the condition match flag is not set (see the exception in the following note). the break will occur and the condition match flag will be set only after the exception source of the re-e xecution-type exception has been cleared by the exception handling routine and re-execution of the same instruction has ended. ? when a post-execution break or data access break occurs simultaneously with a completion-type exception (trapa) that has higher priority, though a break does not occur, the condition match flag is set. 5. note the following ex ception for the above note. if a post-execution break or data access break is satisfied by an instruction that generates a cpu address error by data access, the cpu address error is given priority over the break. note that the ubc condition match flag is set in this case. 6. note the following when a break occurs in a delay slot. if a pre-execution break is set at the delay slot instruction of the rte instruction, the break does not occur until the branch destination of the rte instruction. 7. user breaks are disabled during ubc module standby mode. do not read from or write to the ubc registers during ubc module standby mode; the values are not guaranteed.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 399 of 502 rej09b0239-0400 section 17 user debu gging interface (h-udi) this lsi incorporates a user debugging interf ace (h-udi) to provide a boundary scan function and emulator support. this section describes the boundary scan function of the h-udi. for details on emulator functions of the h-udi, refer to the user's manual of the re levant emulator. 17.1 features the h-udi is a serial i/o interface which conforms to jtag (joint test action group, ieee standard 1149.1 and ieee standard test access port and boundary-scan architecture) specifications. the h-udi in this lsi supports a boundary scan function, and is also used for emulator connection. when using an emulator, h-udi functions should not be used. refer to the emulator manual for the method of conn ecting the emulator. figure 17.1 shows a block diagram of the h-udi.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 400 of 502 rej09b0239-0400 sdir sdid tck tdo tdi tms trst sdbpr mux sdbsr shift register tap controller decoder local bus [legend] sdbpr: bypass register sdbsr: boundary scan register sdir: instruction register sdid :id register figure 17.1 block diagram of h-udi
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 401 of 502 rej09b0239-0400 17.2 input/output pins table 17.1 shows the pin configuration of the h-udi. table 17.1 pin configuration abbr. input/output description tck input serial data input/output clock pin data is serially supplied to the h-udi from the data input pin (tdi) and output from the data output pin (tdo) in synchronization with this clock. tms input mode select input pin the state of the tap control circuit is determined by changing this signal in synchronization wit h tck. the protocol conforms to the jtag standard (ieee std.1149.1). trst input reset input pin input is accepted asynchronously with respect to tck, and when low, the h-udi is reset. trst must be low for the given period when the power is turned on regardless of using the h-udi function. this is different from the jtag standard. for details on resets, see section 17.4.2, reset configuration. tdi input serial data input pin data transfer to the h-udi is executed by changing this signal in synchronization with tck. tdo output serial data output pin data read from the h-udi is executed by reading this pin in synchronization with tck. the data output timing depends on the command type set in sdir. for details, see section 17.3.2, instruction register (sdir). asemd input ase mode select pin when a low level is input to the asemd pin, ase mode is entered; if a high level is inpu t, normal mode is entered. in ase mode, the emulator functions can be used. the input level on the asemd pin should be held unchanged except during the res pin assertion period.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 402 of 502 rej09b0239-0400 17.3 register descriptions the h-udi has the following registers. for details on the addresses of these registers and the states of these registers in each processing state, see sec tion 18, list of registers. ? bypass register (sdbpr) ? instruction register (sdir) ? boundary scan register (sdbsr) ? id register (sdid) 17.3.1 bypass register (sdbpr) sdbpr is a 1-bit register that cannot be accessed by the cpu. when sdir is set to the bypass mode, sdbpr is connected between h-udi pins (tdi and tdo). th e initial value is undefined. 17.3.2 instruction register (sdir) sdir is a 16-bit read-only register . this register is in jtag idcode in its initial state. it is initialized by trst assertion or in the tap test-logic-reset state, and can be written to by the h- udi irrespective of the cpu mode. operation is not guaranteed if a reserved command is set in this register. bit bit name initial value r/w description 15 to 13 ti7 to ti5 all 1 r 12 ti4 0 r 11 to 8 ti3 to ti0 all 1 r test instruction 7 to 0 the h-udi instruction is transferred to sdir by a serial input from tdi. for commands, see table 17.2. 7 to 2 ? all 1 r reserved these bits are always read as 1. 1 ? 0 r reserved this bit is always read as 0. 0 ? 1 r reserved this bit is always read as 1.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 403 of 502 rej09b0239-0400 table 17.2 h-udi commands bits 15 to 8 ti7 ti6 ti5 ti4 ti3 ti 2 ti1 ti0 description 0 0 0 0 ? ? ? ? jtag extest 0 0 1 0 ? ? ? ? jtag clamp 0 0 1 1 ? ? ? ? jtag highz 0 1 0 0 ? ? ? ? jtag sample/preload 0 1 1 0 ? ? ? ? h-udi reset, negate 0 1 1 1 ? ? ? ? h-udi reset, assert 1 0 1 ? ? ? ? ? h-udi interrupt 1 1 1 0 ? ? ? ? jtag idcode (initial value) 1 1 1 1 ? ? ? ? jtag bypass other than above reserved 17.3.3 boundary scan register (sdbsr) sdbsr is a 333-bit shift register, located on the pa d, for controlling the input/output pins of this lsi. the initial value is undefined. this register cannot be accessed by the cpu. using the extest, sample/preload, clamp, and highz commands, a boundary scan test conforming to the jtag standard can be carried out. table 17.3 s hows the correspondence between this lsi's pins and boundary scan register bits.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 404 of 502 rej09b0239-0400 table 17.3 external pins and boundary scan register bits bit pin name i/o bit pin name i/o from tdi 303 pe02/hifdreq in 332 pd06/-/rxd2/- in 302 pe01/hifrdy in 331 pd05/-/txd2/- in 301 pe00/hifebl in 330 pd04/irq4/sck1/- in 300 pc17/-/-/- in 329 pd03/irq3/rxd1/- in 299 pc16/-/-/- in 328 pd02/irq2/txd1/- in 298 pd06/-/rxd2/- out 327 pd01/irq1/-/- in 297 pd05/-/txd2/- out 326 pd00/irq0/-/- in 296 pd04/irq4/sck1/- out 325 pe08/ hifcs in 295 pd03/irq3/rxd1/- out 324 pe24/hifd15/-/- in 294 pd02/irq2/txd1/- out 323 pe23/hifd14/-/- in 293 pd01/irq1/-/- out 322 pe22/hifd13/cts0/- in 292 pd00/irq0/-/- out 321 pe21/hifd12/rts0/- in 291 pe08/ hifcs out 320 pe20/hifd11/-/- in 290 pe24/hifd15/-/- out 319 pe19/hifd10/-/- in 289 pe23/hifd14/-/- out 318 pe18/hifd09/-/- in 288 pe22/hifd13/cts0/- out 317 pe17/hifd08/sck0/- in 287 pe21/hifd12/rts0/- out 316 pe16/hifd07/rxd0/- in 286 pe20/hifd11/-/- out 315 pe15/hifd06/txd0/- in 285 pe19/hifd10/-/- out 314 pe14/hifd05 in 284 pe18/hifd09/-/- out 313 pe13/hifd04 in 283 pe17/hifd08/sck0/- out 312 pe12/hifd03 in 282 pe16/hifd07/rxd0/- out 311 pe11/hifd02 in 281 pe15/hifd06/txd0/- out 310 pe10/hifd01 in 280 pe14/hifd05 out 309 pe09/hifd00 in 279 pe13/hifd04 out 308 pe07/hifrs in 278 pe12/hifd03 out 307 pe06/ hifwr in 277 pe11/hifd02 out 306 pe05/ hifrd in 276 pe10/hifd01 out 305 pe04/ hifint in 275 pe09/hifd00 out 304 pe03/hifmd in 274 pe07/hifrs out
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 405 of 502 rej09b0239-0400 bit pin name i/o bit pin name i/o 273 pe06/ hifwr out 241 pe09/hifd00 control 272 pe05/ hifrd out 240 pe07/hifrs control 271 pe04/ hifint out 239 pe06/ hifwr control 270 pe03/hifmd out 238 pe05/ hifrd control 269 pe02/hifdreq out 237 pe04/ hifint control 268 pe01/hifrdy out 236 pe03/hifmd control 267 pe00/hifebl out 235 pe02/hifdreq control 266 pc17/-/-/- out 234 pe01/hifrdy control 265 pc16/-/-/- out 233 pe00/hifebl control 264 pd06/-/rxd2/- control 232 pc17/-/-/- control 263 pd05/-/txd2/- control 231 pc16/-/-/- control 262 pd04/irq4/sck1/- control 230 pc09/-/-/- in 261 pd03/irq3/rxd1/- control 229 pc15/-/-/- in 260 pd02/irq2/txd1/- control 228 pc08/-/-/- in 259 pd01/irq1/-/- control 227 pc00/-/-/- in 258 pd00/irq0/-/- control 226 pc01/-/-/- in 257 pe08/ hifcs control 225 pc02/-/-/- in 256 pe24/hifd15/-/- control 224 pc03/-/-/- in 255 pe23/hifd14/-/- control 223 pc10/-/-/- in 254 pe22/hifd13/cts0/- control 222 pc18/-/-/- in 253 pe21/hifd12/rts0/- control 221 pc11/-/-/- in 252 pe20/hifd11/-/- control 220 pc13/-/-/- in 251 pe19/hifd10/-/- control 219 pc04/-/-/- in 250 pe18/hifd09/-/- control 218 pc05/-/-/- in 249 pe17/hifd08/sck0/- control 217 pc06/-/-/- in 248 pe16/hifd07/rxd0/- control 216 pc07/-/-/- in 247 pe15/hifd06/txd0/- control 215 pc12/-/-/- in 246 pe14/hifd05 control 214 pc14/-/-/- in 245 pe13/hifd04 control 213 pc20/-/-/- in 244 pe12/hifd03 control 212 pc19/-/-/- in 243 pe11/hifd02 control 211 md3 in 242 pe10/hifd01 control 210 md5 in
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 406 of 502 rej09b0239-0400 bit pin name i/o bit pin name i/o 209 nmi in 177 pc13/-/-/- control 208 testmd in 176 pc04/-/-/- control 207 pc09/-/-/- out 175 pc05/-/-/- control 206 pc15/-/-/- out 174 pc06/-/-/- control 205 pc08/-/-/- out 173 pc07/-/-/- control 204 pc00/-/-/- out 172 pc12/-/-/- control 203 pc01/-/-/- out 171 pc14/-/-/- control 202 pc02/-/-/- out 170 pc20/-/-/- control 201 pc03/-/-/- out 169 pc19/-/-/- control 200 pc10/-/-/- out 168 testout control 199 pc18/-/-/- out 167 md0 in 198 pc11/-/-/- out 166 md1 in 197 pc13/-/-/- out 165 d00 in 196 pc04/-/-/- out 164 d01 in 195 pc05/-/-/- out 163 d02 in 194 pc06/-/-/- out 162 d03 in 193 pc07/-/-/- out 161 d04 in 192 pc12/-/-/- out 160 d05 in 191 pc14/-/-/- out 159 d06 in 190 pc20/-/-/- out 158 d07 in 189 pc19/-/-/- out 157 md2 in 188 testout out 156 d15 in 187 pc09/-/-/- control 155 d14 in 186 pc15/-/-/- control 154 d13 in 185 pc08/-/-/- control 153 d12 in 184 pc00/-/-/- control 152 d11 in 183 pc01/-/-/- control 151 d10 in 182 pc02/-/-/- control 150 d09 in 181 pc03/-/-/- control 149 d08 in 180 pc10/-/-/- control 148 -/cke in 179 pc18/-/-/- control 147 -/ cas in 178 pc11/-/-/- control 146 -/ ras in
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 407 of 502 rej09b0239-0400 bit pin name i/o bit pin name i/o 145 -/ cs3 in 113 d05 control 144 d00 out 112 d06 control 143 d01 out 111 d07 control 142 d02 out 110 d15 control 141 d03 out 109 d14 control 140 d04 out 108 d13 control 139 d05 out 107 d12 control 138 d06 out 106 d11 control 137 d07 out 105 d10 control 136 d15 out 104 d09 control 135 d14 out 103 d08 control 134 d13 out 102 we0 , dqmll control 133 d12 out 101 we1 , dqmlu, we control 132 d11 out 100 rdwr control 131 d10 out 99 -/cke control 130 d09 out 98 -/ cas control 129 d08 out 97 -/ ras control 128 we0 , dqmll out 96 -/ cs3 control 127 we1 , dqmlu, we out 95 a00 control 126 rdwr out 94 a01 control 125 -/cke out 93 a02 control 124 -/ cas out 92 pb13/ bs in 123 -/ ras out 91 pb11/ cs4 in 122 -/ cs3 out 90 pb00/ wait in 121 a00 out 89 pb05/ iciord in 120 a01 out 88 pb06/ iciowr in 119 a02 out 87 pb01/ iois16 in 118 d00 control 86 pb09/ ce2a in 117 d01 control 85 pb10/ cs5b , ce1a in 116 d02 control 84 pb07/ ce2b in 115 d03 control 83 pb08/ cs6b , ce1b in 114 d04 control 82 pa16/a16 in
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 408 of 502 rej09b0239-0400 bit pin name i/o bit pin name i/o 81 pa17/a17 in 49 pb10/ cs5b , ce1a out 80 pa18/a18 in 48 pb07/ ce2b out 79 pa19/a19 in 47 pb08/ cs6b , ce1b out 78 pa20/a20 in 46 pa16/a16 out 77 pa21/a21 in 45 pa17/a17 out 76 pa22/a22 in 44 pa18/a18 out 75 pa23/a23 in 43 pa19/a19 out 74 pa24/a24 in 42 pa20/a20 out 73 pa25/a25 in 41 pa21/a21 out 72 pd07/-/sck2/- in 40 pa22/a22 out 71 a03 out 39 pa23/a23 out 70 a04 out 38 pa24/a24 out 69 a05 out 37 pa25/a25 out 68 a06 out 36 pd07/-/sck2/- out 67 a07 out 35 a03 control 66 a08 out 34 a04 control 65 a09 out 33 a05 control 64 a10 out 32 a06 control 63 a11 out 31 a07 control 62 a12 out 30 a08 control 61 a13 out 29 a09 control 60 a14 out 28 a10 control 59 a15 out 27 a11 control 58 pb13/ bs out 26 a12 control 57 cs0 out 25 a13 control 56 pb11/ cs4 out 24 a14 control 55 rd out 23 a15 control 54 pb00/ wait out 22 pb13/ bs control 53 pb05/ iciord out 21 cs0 control 52 pb06/ iciowr out 20 pb11/ cs4 control 51 pb01/ iois16 out 19 rd control 50 pb09/ ce2a out 18 pb00/ wait control
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 409 of 502 rej09b0239-0400 bit pin name i/o bit pin name i/o 17 pb05/ iciord control 7 pa19/a19 control 16 pb06/ iciowr control 6 pa20/a20 control 15 pb01/ iois16 control 5 pa21/a21 control 14 pb09/ ce2a control 4 pa22/a22 control 13 pb10/ cs5b , ce1a control 3 pa23/a23 control 12 pb07/ ce2b control 2 pa24/a24 control 11 pb08/ cs6b , ce1b control 1 pa25/a25 control 10 pa16/a16 control 0 pd07/-/sck2/- control 9 pa17/a17 control to tdo 8 pa18/a18 control note: * control means a low active signal. the corresponding pin is driven with an out value when the control is driven low. 17.3.4 id register (sdid) sdid is a 32-bit read-only register in which sd idh and sdidl are connected. each register is a 16-bit that can be read by the cpu. to read this register by the h-udi side, the contents can be read via the tdo pin when the idcode command is set and the tap state is shift-dr. writing is disabled. bit bit name initial value r/w description 31 to 0 did31 to did0 refer to description r device id 31 to device id 0 id register that is sti pulated by jtag. h'002b200f (initial value) for this lsi. upper four bits may be changed according to the lsi version. sdidh corresponds to bits 31 to 16. sdidl corresponds to bits 15 to 0.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 410 of 502 rej09b0239-0400 17.4 operation 17.4.1 tap controller figure 17.2 shows the internal states of the tap controller. state transiti ons basically conform to the jtag standard. test-logic-reset capture-dr shift-dr exit1-dr pause-dr exit2-dr update-dr select-dr-scan run-test/idle 1 0 0 0 0 11 1 1 0 0 0 1 11 0 1 1 1 0 capture-ir shift-ir exit1-ir pause-ir exit2-ir update-ir select-ir-scan 0 0 1 0 0 0 1 0 1 1 1 0 figure 17.2 tap controller state transitions note: the transition condition is the tms value at the rising edge of the tck signal. the tdi value is sampled at the rising edge of the tck signal and is shifted at the falling edge of the tck signal. for details on change timing of the tdo value, see section 17.4.3, tdo output timing. the tdo pin is high impedance, except in the shift-dr and shift-ir states. a transition to the test-logic-reset state is made asynchronously with tck by driving the trst signal 0.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 411 of 502 rej09b0239-0400 17.4.2 reset configuration table 17.4 reset configuration asemd * 1 res trst lsi state high low low normal reset and h-udi reset high normal reset high low h-udi reset only high normal operation low low low reset hold * 2 high normal reset high low h-udi reset only high normal operation notes: 1. selects to normal mode or ase mode. asemd = high: normal mode asemd = low: ase mode 2. in ase mode, the reset hold state is entered by driving the res and trst pins low for the given time. in this state, the cpu does not start up, even if the res pin is driven high. after that, when the trst pin is driven high, h-udi operation is enabled, but the cpu does not start up. the reset hold stat e is canceled by the following: another res assert (power-on reset) or trst reassert. 17.4.3 tdo output timing the timing of data output from the tdo differs according to the command type set in sdir. the timing changes at the tck falling edge when jtag commands (extest, clamp, highz, sample/preload, idcode, and bypass) are set. this is a timing of the jtag standard. when the h-udi commands (h-udi reset negate, h-udi reset assert, and h-udi interrupt) are set, the tdo signal is output at the tck rising edge earlier than the jtag standard by a half cycle.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 412 of 502 rej09b0239-0400 tdo (when the h-udi command is set) tck tdo (when the jtag command is set) t tdo t tdo figure 17.3 h-udi data transfer timing 17.4.4 h-udi reset an h-udi reset is generated by setting the h-udi reset assert command in sdir. an h-udi reset is of the same kind as a power-on reset. an h- udi reset is released by inputting the h-udi reset negate command. the required time between th e h-udi reset assert command and h-udi reset negate command is the same as time for keeping the resetp pin low to apply a power-on reset. h-udi reset assert h-udi reset negate sdir lsi internal reset cpu state branch to h'a0000000 figure 17.4 h-udi reset 17.4.5 h-udi interrupt the h-udi interrupt function generates an interrupt by setting an h-udi command in sdir. an h-udi interrupt is an interrupt of general exceptions, resulting in a branch to an address based on the vbr value plus offset, and with return by the rte instruction. this interrupt request has a fixed priority level of 15. h-udi interrupts are accepted in sleep mode, but not in standby mode.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 413 of 502 rej09b0239-0400 17.5 boundary scan a command can be set in sdir by the h-udi to place the h-udi pins in boundary scan mode stipulated by jtag. 17.5.1 supported instructions this lsi supports the three mandatory instructions defined in the jtag standard (bypass, sample/preload, and extest) and three op tion instructions (idcode, clamp, and highz). bypass: the bypass instruction is a mandatory instruction that operates the bypass register. this instruction shortens the shift path to speed up serial data transfer involving other chips on the printed circuit board. while this instruction is ex ecuting, the test circu it has no effect on the system circuits. the upper four bits of the instruction code are 1111. sample/preload: the sample/preload instruction inputs data from this lsi's internal circuitry to the boundary scan register, outputs data from the scan path, and loads data onto the scan path. while this instruction is executed, signal s input to this lsi pins are transmitted directly to the internal circuitry, and internal circuit outputs are directly output externally from the output pins. this lsi's system circuits are not affected by execution of this instruction. the upper four bits of the instruction code are 0100. in a sample operation, a snapshot of a value to be transferred from an input pin to the internal circuitry, or a value to be transferred from the intern al circuitry to an output pin, is latched into the boundary scan register and read from the scan path. snapshot latching is performed in synchronization with the rising edge of the tck signal in the capture-dr state. snapshot latching does not affect normal operation of this lsi. in a preload operation, an initial value is set in the parallel output latch of the boundary scan register from the scan path prior to the extest instruction. without a preload operation, when the extest instruction was executed an undefined value would be output from the output pin until completion of the initial scan sequence (transfer to the output latch) (with the extest instruction, the parallel output latch value is constantly output to the output pin). extest: this instruction is provided to test external circuitry when this lsi is mounted on a printed circuit board. when this instruction is executed, output pins are used to output test data (previously set by the sample/preload instruction) from the boundary scan register to the printed circuit board, and input pins are used to latch test results into the boundary scan register from the printed circuit board. if testing is carri ed out by using the extest instruction n times, the nth test data is scanned-in when test data (n-1) is scanned out.
section 17 user debugging interface (h-udi) rev. 4.00 sep. 13, 2007 page 414 of 502 rej09b0239-0400 data loaded into the output pin boundary scan register in the capture-dr state is not used for external circuit testing (it is replaced by a shift operation). the upper four bits of the instruction code are 0000. idcode: a command can be set in sdir by the h- udi pins to place the h-udi pins in the idcode mode stipulated by jtag. when the h-udi is initialized ( trst is asserted or tap is in the test-logic-reset state), th e idcode mode is entered. clamp, highz: a command can be set in sdir by the h-udi pins to place the h-udi pins in the clamp or highz mode stipulated by jtag. 17.5.2 points for attention ? boundary scan mode does not cover clock-related signals (extal, xtal, ckio, and testout2). ? boundary scan mode does not cover system- and e10a-related signals ( res and asemd ). ? boundary scan mode does not cover h-udi-related signals (tck, tdi, tdo, tms, and trst ). ? when the extest, clamp, and highz commands are set, fix the res pin low. ? when a boundary scan test for other than bypass and idcode is carried out, fix the asemd pin high. 17.6 usage notes ? an h-udi command, once set, will not be modified as long as another command is not re- issued from the h-udi. if the same command is given continuously, the command must be set after a command (bypass, etc.) that does not affect lsi operations is once set. ? because lsi operations are suspended in st andby mode, h-udi commands are not accepted. to hold the state of the tap before and afte r standby mode, the tck signal must be high during standby mode transition. ? the h-udi is used for emulator connection. therefore, h-udi functions cannot be used when using an emulator.
section 18 list of registers rev. 4.00 sep. 13, 2007 page 415 of 502 rej09b0239-0400 section 18 list of registers the register list gives information on the on-chip i/o register addresses, how the register bits are configured, and the register states in each operating mode. the information is given as shown below. 1. register addresses (address order) ? registers are listed from the lower allocation addresses. ? reserved addresses are indicated by ? in the register name column. do not access the reserved addresses. ? when registers consist of 16 or 32 bits, the addresses of the msbs are given. ? registers are classified accordi ng to functional modules. ? the numbers of access cycles are given. 2. register bits ? bit configurations of the registers are listed in the same order as the register addresses. ? reserved bits are indicated by ? in the bit name column. ? space in the bit name field indicates that the entire register is allo cated to either the counter or data. ? for the registers of 16 or 32 bits, the msb is listed first. 3. register states in each operating mode ? register states are listed in the same order as the register addresses. ? the register states shown here ar e for the basic operating modes. if there is a specific reset for an on-chip peripheral module, refer to the section on that on-chip peripheral module. 18.1 register addresses (address order) entries under access size in dicates numbers of bits. the number of access cycles indicate the number of cy cles of the given reference clock. b, w, and l indicate values for 8-, 16-, and 32-bit accesses, respectively. note: access to undefined or reserved addresses is prohibited. since operation or continued operation is not guaranteed when these regist ers are accessed, do not attempt such access.
section 18 list of registers rev. 4.00 sep. 13, 2007 page 416 of 502 rej09b0239-0400 register name abbreviation no. of bits address module access size cache control register 3 ccr3 32 h'f80000b4 cache 32 port a data register h padrh 16 h'f8050000 i/o 8/16 port a io register h paiorh 16 h'f8050004 i/o 8/16 port a control register h1 pacrh1 16 h'f8050008 i/o 8/16 port a control register h2 pacrh2 16 h'f805000a i/o 8/16 port b data register l pbdrl 16 h'f8050012 i/o 8/16 port b io register l pbiorl 16 h'f8050016 i/o 8/16 port b control register l1 pbcrl1 16 h'f805001c i/o 8/16 port b control register l2 pbcrl2 16 h'f805001e i/o 8/16 port c data register h pcdrh 16 h'f8050020 i/o 8/16 port c data register l pcdrl 16 h'f8050022 i/o 8/16 port c io register h pciorh 16 h'f8050024 i/o 8/16 port c io register l pciorl 16 h'f8050026 i/o 8/16 port d data register l pddrl 16 h'f8050032 i/o 8/16 port d io register l pdiorl 16 h'f8050036 i/o 8/16 port d control register l2 pdcrl2 16 h'f805003e i/o 8/16 port e data register h pedrh 16 h'f8050040 i/o 8/16 port e data register l pedrl 16 h'f8050042 i/o 8/16 port e io register h peiorh 16 h'f8050044 i/o 8/16 port e io register l peiorl 16 h'f8050046 i/o 8/16 port e control register h1 pecrh1 16 h'f8050048 i/o 8/16 port e control register h2 pecrh2 16 h'f805004a i/o 8/16 port e control register l1 pecrl1 16 h'f805004c i/o 8/16 port e control register l2 pecrl2 16 h'f805004e i/o 8/16 interrupt priority register c iprc 16 h'f8080000 intc 16 interrupt priority register d iprd 16 h'f8080002 intc 16 interrupt priority register e ipre 16 h'f8080004 intc 16 standby control register 3 stbcr3 8 h'f80a0000 power- down mode 8 standby control register 4 stbcr4 8 h'f80a0004 power- down mode 8
section 18 list of registers rev. 4.00 sep. 13, 2007 page 417 of 502 rej09b0239-0400 register name abbreviation no. of bits address module access size instruction register sdir 16 h'f8100200 h-udi 16 id register sdid 32 h'f8100214 h-udi 16/32 interrupt control register 0 icr0 16 h'f8140000 intc 8/16 irq control register irqcr 16 h'f8140002 intc 8/16 irq status register irqsr 16 h'f8140004 intc 8/16 interrupt priority register a ipra 16 h'f8140006 intc 8/16 interrupt priority register b iprb 16 h'f8140008 intc 8/16 frequency control register frqcr 16 h'f815ff80 cpg 16 standby control register stbcr 8 h'f815ff82 power- down mode 8 watch dog timer counter wtcnt 8 h'f815ff84 wdt 8/16 * watch dog timer control/status register wtcsr 8 h'f815ff86 wdt 8/16 * standby control register 2 stbcr2 8 h'f815ff88 power- down mode 8 serial mode register_0 scsmr_0 16 h'f8400000 scif_0 16 bit rate register_0 scbrr_0 8 h'f8400004 scif_0 8 serial control register_0 scscr_0 16 h'f8400008 scif_0 16 transmit fifo data register_0 scftdr_0 8 h'f840000c scif_0 8 serial status register_0 scfsr_0 16 h'f8400010 scif_0 16 receive fifo data register_0 scfrdr_0 8 h'f8400014 scif_0 8 fifo control register_0 scfcr_0 16 h'f8400018 scif_0 16 fifo data count register_0 scfdr_0 16 h'f840001c scif_0 16 serial port register_0 scsptr_0 16 h'f8400020 scif_0 16 line status register_0 sclsr_0 16 h'f8400024 scif_0 16 serial mode register_1 scsmr_1 16 h'f8410000 scif_1 16 bit rate register_1 scbrr_1 8 h'f8410004 scif_1 8 serial control register_1 scscr_1 16 h'f8410008 scif_1 16 transmit fifo data register_1 scftdr_1 8 h'f841000c scif_1 8 serial status register_1 scfsr_1 16 h'f8410010 scif_1 16
section 18 list of registers rev. 4.00 sep. 13, 2007 page 418 of 502 rej09b0239-0400 register name abbreviation no. of bits address module access size receive fifo data register_1 scfrdr_1 8 h'f8410014 scif_1 8 fifo control register_1 scfcr_1 16 h'f8410018 scif_1 16 fifo data count register_1 scfdr_1 16 h'f841001c scif_1 16 serial port register_1 scsptr_1 16 h'f8410020 scif_1 16 line status register_1 sclsr_1 16 h'f8410024 scif_1 16 serial mode register_2 scsmr_2 16 h'f8420000 scif_2 16 bit rate register_2 scbrr_2 8 h'f8420004 scif_2 8 serial control register_2 scscr_2 16 h'f8420008 scif_2 16 transmit fifo data register_2 scftdr_2 8 h'f842000c scif_2 8 serial status register_2 scfsr_2 16 h'f8420010 scif_2 16 receive fifo data register_2 scfrdr_2 8 h'f8420014 scif_2 8 fifo control register_2 scfcr_2 16 h'f8420018 scif_2 16 fifo data count register_2 scfdr_2 16 h'f842001c scif_2 16 serial port register_2 scsptr_2 16 h'f8420020 scif_2 16 line status register_2 sclsr_2 16 h'f8420024 scif_2 16 compare match timer start register cmstr 16 h'f84a0070 cmt 8/16 compare match timer control/status register_0 cmcsr_0 16 h'f84a0072 cmt 8/16 compare match counter_0 cmcnt_0 16 h'f84a0074 cmt 8/16 compare match timer constant register_0 cmcor_0 16 h'f84a0076 cmt 8/16 compare match timer control/status register_1 cmcsr_1 16 h'f84a0078 cmt 8/16 compare match counter_1 cmcnt_1 16 h'f84a007a cmt 8/16 compare match timer constant register_1 cmcor_1 16 h'f84a007c cmt 8/16 hif index register hifidx 32 h'f84d0000 hif 32 hif general status register hifgsr 32 h'f84d0004 hif 32 hif status/control register hifscr 32 h'f84d0008 hif 32 hif memory control register hifmcr 32 h'f84d000c hif 32 hif internal interrupt control register hifiicr 32 h'f84d0010 hif 32 hif external interrupt control register hifeicr 32 h'f84d0014 hif 32
section 18 list of registers rev. 4.00 sep. 13, 2007 page 419 of 502 rej09b0239-0400 register name abbreviation no. of bits address module access size hif address register hifadr 32 h'f84d0018 hif 32 hif data register hifdata 32 h'f84d001c hif 32 hifdreq trigger register hifdtr 32 h'f84d0020 hif 32 hif bank interrupt control register hifbicr 32 h'f84d0024 hif 32 hif boot control register hifbcr 32 h'f84d0040 hif 32 common control register cmncr 32 h'f8fd0000 bsc 32 bus control register for area 0 cs0bcr 32 h'f8fd0004 bsc 32 bus control register for area 3 cs3bcr 32 h'f8fd000c bsc 32 bus control register for area 4 cs4bcr 32 h'f8fd0010 bsc 32 bus control register for area 5b cs5bbcr 32 h'f8fd0018 bsc 32 bus control register for area 6b cs6bbcr 32 h'f8fd0020 bsc 32 wait control register for area 0 cs0wcr 32 h'f8fd0024 bsc 32 wait control register for area 3 cs3wcr 32 h'f8fd002c bsc 32 wait control register for area 4 cs4wcr 32 h'f8fd0030 bsc 32 wait control register for area 5b cs5bwcr 32 h'f8fd0038 bsc 32 wait control register for area 6b cs6bwcr 32 h'f8fd0040 bsc 32 sdram control register sdcr 32 h'f8fd0044 bsc 32 refresh timer control/status register rtcsr 32 h'f8fd0048 bsc 32 refresh timer counter rtcnt 32 h'f8fd004c bsc 32 refresh time constant register rtcor 32 h'f8fd0050 bsc 32 break data register b bdrb 32 h'ffffff90 ubc 32 break data mask register b bdmrb 32 h'ffffff94 ubc 32 break control register brcr 32 h'ffffff98 ubc 32 execution times break register betr 16 h'ffffff9c ubc 16 break address register b barb 32 h'ffffffa0 ubc 32 break address mask register b bamrb 32 h'ffffffa4 ubc 32 break bus cycle register b bbrb 16 h'ffffffa8 ubc 16 branch source register brsr 32 h'ffffffac ubc 32 break address register a bara 32 h'ffffffb0 ubc 32 break address mask register a bamra 32 h'ffffffb4 ubc 32 break bus cycle register a bbra 16 h'ffffffb8 ubc 16
section 18 list of registers rev. 4.00 sep. 13, 2007 page 420 of 502 rej09b0239-0400 register name abbreviation no. of bits address module access size branch destination register brdr 32 h'ffffffbc ubc 32 cache control register 1 ccr1 32 h'ffffffec cache 32 note: * the numbers of access cycles are eight bits when reading and 16 bits when writing.
section 18 list of registers rev. 4.00 sep. 13, 2007 page 421 of 502 rej09b0239-0400 18.2 register bits register addresses and bit names of the on-chip peripheral modules are described below. each line covers eight bits, and 16-bit and 32-bit re gisters are shown as 2 or 4 lines, respectively. register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ccr3 ? ? ? ? ? ? ? ? cache ? ? ? ? ? ? ? csize2 csize1 csize0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? padrh ? ? ? ? ? ? pa25dr pa24dr i/o pa23dr pa22dr pa21dr pa20dr pa19dr pa18dr pa17dr pa16dr paiorh ? ? ? ? ? ? pa25ior pa24ior pa23ior pa22ior pa21ior pa20ior pa19ior pa18ior pa17ior pa16ior pacrh1 ? ? ? ? ? ? ? ? ? ? ? ? ? pa25md0 ? pa24md0 pacrh2 ? pa23md0 ? pa22md0 ? pa21md0 ? pa20md0 ? pa19md0 ? pa18md0 ? pa17md0 ? pa16md0 pbdrl ? ? pb13dr pb12dr pb11dr pb10dr pb9dr pb8dr pb7dr pb6dr pb5dr pb4dr pb3dr pb2dr pb1dr pb0dr pbiorl ? ? pb13ior pb12ior pb11ior pb10ior pb9ior pb8ior pb7ior pb6ior pb5ior pb4ior pb3ior pb2ior pb1ior pb0ior pbcrl1 ? ? ? ? ? pb13md0 ? pb12md0 ? pb11md0 ? pb10md0 ? pb9md0 ? pb8md0 pbcrl2 ? pb7md0 ? pb6md0 ? pb5md0 ? pb4md0 ? pb3md0 ? pb2md0 ? pb1md0 ? pb0md0 pcdrh ? ? ? ? ? ? ? ? ? ? ? pc20dr pc19dr pc18dr pc17dr pc16dr pcdrl pc15dr pc14dr pc13dr pc12dr pc11dr pc10dr pc9dr pc8dr pc7dr pc6dr pc5dr pc4dr pc3dr pc2dr pc1dr pc0dr pciorh ? ? ? ? ? ? ? ? ? ? ? pc20ior pc19ior pc18i or pc17ior pc16ior
section 18 list of registers rev. 4.00 sep. 13, 2007 page 422 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module pciorl pc15ior pc14ior pc 13ior pc12ior pc11i or pc10ior pc9i or pc8ior i/o pc7ior pc6ior pc5ior pc4ior pc3ior pc2i or pc1ior pc0ior pddrl ? ? ? ? ? ? ? ? pd7dr pd6dr pd5dr pd4dr pd3dr pd2dr pd1dr pd0dr pdiorl ? ? ? ? ? ? ? ? pd7ior pd6ior pd5ior pd4ior pd3ior pd2i or pd1ior pd0ior pdcrl2 pd7md1 pd7md0 pd6md1 pd6md0 pd5md1 pd5md0 pd4md1 pd4md0 pd3md1 pd3md0 pd2md1 pd2md0 ? pd1md0 ? pd0md0 pedrh ? ? ? ? ? ? ? pe24dr pe23dr pe22dr pe21dr pe20dr pe19dr pe18dr pe17dr pe16dr pedrl pe15dr pe14dr pe13dr pe 12dr pe11dr pe10dr pe9dr pe8dr pe7dr pe6dr pe5dr pe4dr pe3dr pe2dr pe1dr pe0dr peiorh ? ? ? ? ? ? ? pe24ior pe23ior pe22ior pe21ior pe20ior pe19ior pe18ior pe17ior pe16ior peiorl pe15ior pe14ior pe13ior pe12i or pe11ior pe10ior pe9ior pe8ior pe7ior pe6ior pe5ior pe4ior pe3ior pe2ior pe1ior pe0ior pecrh1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? pe24md1 pe24md0 pecrh2 pe23md1 pe23md0 pe22md1 pe22md0 pe21md1 pe21md0 pe20md1 pe20md0 pe19md1 pe19md0 pe18md1 pe18md0 pe17md1 pe17md0 pe16md1 pe16md0 pecrl1 pe15md1 pe15md0 ? pe14md0 ? pe13md0 ? pe12md0 ? pe11md0 ? pe10md0 ? pe9md0 ? pe8md0 pecrl2 ? pe7md0 ? pe6md0 ? pe5md0 ? pe4md0 ? pe3md0 ? pe2md0 ? pe1md0 ? pe0md0 iprc iprc15 iprc14 iprc13 iprc12 ip rc11 iprc10 iprc9 iprc8 intc iprc7 iprc6 iprc5 iprc4 iprc3 iprc2 iprc1 iprc0 iprd iprd15 iprd14 iprd13 iprd12 iprd11 iprd10 iprd9 iprd8 iprd7 iprd6 iprd5 iprd4 ? ? ? ? ipre ipre15 ipre14 ipre13 ipre12 ipre11 ipre10 ipre9 ipre8 ? ? ? ? ? ? ? ?
section 18 list of registers rev. 4.00 sep. 13, 2007 page 423 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module stbcr3 ? ? ? mstp15 ? mstp13 mstp12 mstp11 stbcr4 ? ? ? mstp23 ? ? ? mstp19 power- down mode sdir ti7 ti6 ti5 ti4 ti3 ti2 ti1 ti0 h-udi ? ? ? ? ? ? ? ? sdid did31 did30 did29 did28 did27 did26 did25 did24 did23 did22 did21 did20 did19 did18 did17 did16 did15 did14 did13 did12 did11 did10 did9 did8 did7 did6 did5 did4 did3 did2 did1 did0 icr0 nmil ? ? ? ? ? ? nmie intc ? ? ? ? ? ? ? ? irqcr irq71s irq70s irq61s irq60s irq51s irq50s irq41s irq40s irq31s irq30s irq21s irq20s irq11s irq10s irq01s irq00s irqsr irq7l irq6l irq5l irq 4l irq3l irq2l irq1l irq0l irq7f irq6f irq5f irq4f irq3f irq2f irq1f irq0f ipra ipra15 ipra14 ipra13 ipra12 ipra11 ipra10 ipra9 ipra8 ipra7 ipra6 ipra5 ipra4 ipra3 ipra2 ipra1 ipra0 iprb iprb15 iprb14 iprb13 iprb12 iprb11 iprb10 iprb9 iprb8 iprb7 iprb6 iprb5 iprb4 iprb3 iprb2 iprb1 iprb0 frqcr ? ? ? ckoen ? stc2 stc1 stc0 cpg ? ? ? ? ? pfc2 pfc1 pfc0 stbcr stby ? ? ? mdchg ? ? ? power- down mode wtcnt bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 wdt wtcsr tme wt/it ? wovf iovf cks2 cks1 cks0 stbcr2 mstp10 mstp9 ? ? ? mstp5 mstp4 ? power- down mode scsmr_0 ? ? ? ? ? ? ? ? scif_0 c/a chr pe o/e stop ? cks1 cks0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 424 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module scbrr_0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scif_0 scscr_0 ? ? ? ? ? ? ? ? tie rie te re reie ? cke1 cke0 scftdr_0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfsr_0 per3 per2 per1 per0 fer3 fer2 fer1 fer0 er tend tdfe brk fer per rdf dr scfrdr_0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfcr_0 ? ? ? ? ? rstrg2 rstrg1 rstrg0 rtrg1 rtrg0 ttrg1 ttrg0 mce tfrst rfrst loop scfdr_0 ? ? ? t4 t3 t2 t1 t0 ? ? ? r4 r3 r2 r1 r0 scsptr_0 ? ? ? ? ? ? ? ? rtsio rtsdt ctsio ctsd t sckio sckdt spbio spbdt sclsr_0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? orer scsmr_1 ? ? ? ? ? ? ? ? scif_1 c/a chr pe o/e stop ? cks1 cks0 scbrr_1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scscr_1 ? ? ? ? ? ? ? ? tie rie te re reie ? cke1 cke0 scftdr_1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfsr_1 per3 per2 per1 per0 fer3 fer2 fer1 fer0 er tend tdfe brk fer per rdf dr scfrdr_1 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfcr_1 ? ? ? ? ? rstrg2 rstrg1 rstrg0 rtrg1 rtrg0 ttrg1 ttrg0 mce tfrst rfrst loop scfdr_1 ? ? ? t4 t3 t2 t1 t0 ? ? ? r4 r3 r2 r1 r0 scsptr_1 ? ? ? ? ? ? ? ? rtsio rtsdt ctsio ctsd t sckio sckdt spbio spbdt
section 18 list of registers rev. 4.00 sep. 13, 2007 page 425 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module sclsr_1 ? ? ? ? ? ? ? ? scif_1 ? ? ? ? ? ? ? orer scsmr_2 ? ? ? ? ? ? ? ? scif_2 c/a chr pe o/e stop ? cks1 cks0 scbrr_2 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scscr_2 ? ? ? ? ? ? ? ? tie rie te re reie ? cke1 cke0 scftdr_2 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfsr_2 per3 per2 per1 per0 fer3 fer2 fer1 fer0 er tend tdfe brk fer per rdf dr scfrdr_2 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 scfcr_2 ? ? ? ? ? rstrg2 rstrg1 rstrg0 rtrg1 rtrg0 ttrg1 ttrg0 mce tfrst rfrst loop scfdr_2 ? ? ? t4 t3 t2 t1 t0 ? ? ? r4 r3 r2 r1 r0 scsptr_2 ? ? ? ? ? ? ? ? ? (reserved) ? (reserved) ? (reserved) ? (reserved) sckio sckdt spbio spbdt sclsr_2 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? orer cmstr ? ? ? ? ? ? ? ? cmt ? ? ? ? ? ? str1 str0 cmcsr_0 ? ? ? ? ? ? ? ? cmf cmie ? ? ? ? cks1 cks0 cmcnt_0 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 cmcor_0 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 cmcsr_1 ? ? ? ? ? ? ? ? cmf cmie ? ? ? ? cks1 cks0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 426 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module cmcnt_1 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 cmt bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 cmcor_1 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 hifidx ? ? ? ? ? ? ? ? hif ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? reg5 reg4 reg3 reg2 reg1 reg0 byte1 byte0 hifgsr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? status15 status14 status13 status12 status11 status10 status9 status8 status7 status6 status5 status4 status3 status2 status1 status0 hifscr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? dmd dpol bmd bsel ? ? md1 ? ? ? edn bo hifmcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? lock ? wt ? rd ? ? ai/ad hifiicr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? iic6 iic5 iic4 iic3 iic2 iic1 iic0 iir hifeicr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? eic6 eic5 eic4 eic3 eic2 eic1 eic0 eir
section 18 list of registers rev. 4.00 sep. 13, 2007 page 427 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module hifadr ? ? ? ? ? ? ? ? hif ? ? ? ? ? ? ? ? ? ? ? ? ? ? a9 a8 a7 a6 a5 a4 a3 a2 ? ? hifdata d31 d30 d29 d 28 d27 d26 d25 d24 d23 d22 d21 d20 d19 d18 d17 d16 d15 d14 d13 d12 d11 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1 d0 hifdtr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? dtrg hifbicr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bie bif hifbcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ac cmncr ? ? ? ? ? ? ? ? bsc ? ? ? ? ? ? ? ? ? ? ? map ? ? ? ? ? ? ? ? endian ? hizmem hizcnt cs0bcr ? ? iww1 iww0 ? iwrwd1 iwrwd0 ? iwrws1 iwrws0 ? iwrrd1 iwrrd0 ? iwrrs1 iwrrs0 type3 type2 type1 type0 ? bsz1 bsz0 ? ? ? ? ? ? ? ? ?
section 18 list of registers rev. 4.00 sep. 13, 2007 page 428 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module cs3bcr ? ? iww1 iww0 ? iwrwd1 iwrwd0 ? bsc iwrws1 iwrws0 ? iwrrd1 iwrrd0 ? iwrrs1 iwrrs0 type3 type2 type1 type0 ? bsz1 bsz0 ? ? ? ? ? ? ? ? ? cs4bcr ? ? iww1 iww0 ? iwrwd1 iwrwd0 ? iwrws1 iwrws0 ? iwrrd1 iwrrd0 ? iwrrs1 iwrrs0 type3 type2 type1 type0 ? bsz1 bsz0 ? ? ? ? ? ? ? ? ? cs5bbcr ? ? iww1 iww0 ? iwrwd1 iwrwd0 ? iwrws1 iwrws0 ? iwrrd1 iwrrd0 ? iwrrs1 iwrrs0 type3 type2 type1 type0 ? bsz1 bsz0 ? ? ? ? ? ? ? ? ? cs6bbcr ? ? iww1 iww0 ? iwrwd1 iwrwd0 ? iwrws1 iwrws0 ? iwrrd1 iwrrd0 ? iwrrs1 iwrrs0 type3 type2 type1 type0 ? bsz1 bsz0 ? ? ? ? ? ? ? ? ? cs0wcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sw1 sw0 wr3 wr2 wr1 wr0 wm ? ? ? ? hw1 hw0 cs3wcr ? ? ? ? ? ? ? ? ? ? ? bas ? ? ? ? ? ? ? ? ? wr3 wr2 wr1 wr0 wm ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? wtrp1 wtrp0 ? wtrcd1 wtrcd0 ? a3cl1 cs3wcr (when sdram is in use) a3cl0 ? ? trwl1 trwl0 ? wtrc1 wtrc0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 429 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module cs4wcr ? ? ? ? ? ? ? ? bsc ? ? ? bas ? ww2 ww1 ww0 ? ? ? sw1 sw0 wr3 wr2 wr1 wr0 wm ? ? ? ? hw1 hw0 cs5bwcr ? ? ? ? ? ? ? ? ? ? ? ? ? ww2 ww1 ww0 ? ? ? sw1 sw0 wr3 wr2 wr1 wr0 wm ? ? ? ? hw1 hw0 ? ? ? ? ? ? ? ? ? ? sa1 sa0 ? ? ? ? cs5bwcr (when pcmcia is in use) ? ted3 ted2 ted1 ted0 pcw3 pcw2 pcw1 pcw0 wm ? ? the3 the2 the1 the0 cs6bwcr ? ? ? ? ? ? ? ? ? ? ? bas ? ? ? ? ? ? ? sw1 sw0 wr3 wr2 wr1 wr0 wm ? ? ? ? hw1 hw0 ? ? ? ? ? ? ? ? ? ? sa1 sa0 ? ? ? ? cs6bwcr (when pcmcia is in use) ? ted3 ted2 ted1 ted0 pcw3 pcw2 pcw1 pcw0 wm ? ? the3 the2 the1 the0 sdcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rfsh rmode ? bactv ? ? ? a3row1 a3row0 ? a3col1 a3col0 rtcsr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmf ? cks2 cks1 cks0 rrc2 rrc1 rrc0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 430 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module rtcnt ? ? ? ? ? ? ? ? bsc ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 rtcor ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bdrb bdb31 bdb30 bdb29 bdb28 bdb27 bdb26 bdb25 bdb24 ubc bdb23 bdb22 bdb21 bdb20 bdb19 bdb18 bdb17 bdb16 bdb15 bdb14 bdb13 bdb12 bdb11 bdb10 bdb9 bdb8 bdb7 bdb6 bdb5 bdb4 bdb3 bdb2 bdb1 bdb0 bdmrb bdmb31 bdmb30 bdmb29 bdmb 28 bdmb27 bdmb26 bdmb25 bdmb24 bdmb23 bdmb22 bdmb21 bdmb20 bdmb19 bdmb18 bdmb17 bdmb16 bdmb15 bdmb14 bdmb13 bdmb12 bdmb11 bdmb10 bdmb9 bdmb8 bdmb7 bdmb6 bdmb5 bdmb4 bdmb3 bdmb2 bdmb1 bdmb0 brcr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? scmfca scmfcb scmfda scmfdb pcte pcba ? ? dbeb pcbb ? ? seq ? ? etbe betr ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bet11 bet10 bet9 bet8 bet7 bet6 bet5 bet4 bet3 bet2 bet1 bet0 barb bab31 bab30 bab29 bab28 bab27 bab26 bab25 bab24 bab23 bab22 bab21 bab20 bab19 bab18 bab17 bab16 bab15 bab14 bab13 bab12 bab11 bab10 bab9 bab8 bab7 bab6 bab5 bab4 bab3 bab2 bab1 bab0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 431 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module bamrb bamb31 bamb30 bamb29 bamb28 bamb27 bamb26 bamb25 bamb24 ubc bamb23 bamb22 bamb21 bamb20 bamb19 bamb18 bamb17 bamb16 bamb15 bamb14 bamb13 bamb12 bamb11 bamb10 bamb9 bamb8 bamb7 bamb6 bamb5 bamb4 bamb3 bamb2 bamb1 bamb0 bbrb ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cdb1 cdb0 idb1 idb0 rwb1 rwb0 szb1 szb0 brsr svf ? ? ? bsa27 bsa26 bsa25 bsa24 bsa23 bsa22 bsa21 bsa20 bsa19 bsa18 bsa17 bsa16 bsa15 bsa14 bsa13 bsa12 bsa11 bsa10 bsa9 bsa8 bsa7 bsa6 bsa5 bsa4 bsa3 bsa2 bsa1 bsa0 bara baa31 baa30 baa29 baa28 baa27 baa26 baa25 baa24 baa23 baa22 baa21 baa20 baa19 baa18 baa17 baa16 baa15 baa14 baa13 baa12 baa11 baa10 baa9 baa8 baa7 baa6 baa5 baa4 baa3 baa2 baa1 baa0 bamra bama31 bama30 bama29 bama 28 bama27 bama26 bama25 bama24 bama23 bama22 bama21 bama20 bama19 bama18 bama17 bama16 bama15 bama14 bama13 bama12 bama11 bama10 bama9 bama8 bama7 bama6 bama5 bama4 bama3 bama2 bama1 bama0 bbra ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cda1 cda0 ida1 ida0 rwa1 rwa0 sza1 sza0 brdr dvf ? ? ? bda27 bda26 bda25 bda24 bda23 bda22 bda21 bda20 bda19 bda18 bda17 bda16 bda15 bda14 bda13 bda12 bda11 bda10 bda9 bda8 bda7 bda6 bda5 bda4 bda3 bda2 bda1 bda0
section 18 list of registers rev. 4.00 sep. 13, 2007 page 432 of 502 rej09b0239-0400 register abbreviation bit 31/23/15/7 bit 30/22/14/6 bit 29/21/13/5 bit 28/20/12/4 bit 27/19/11/3 bit 26/18/10/2 bit 25/17/9/1 bit 24/16/8/0 module ccr1 ? ? ? ? ? ? ? ? cache ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cf cb wt ce
section 18 list of registers rev. 4.00 sep. 13, 2007 page 433 of 502 rej09b0239-0400 18.3 register states in each processing state module register abbreviation address power-on reset software standby module standby sleep cache ccr3 h'f80000b4 initialized retained retained retained i/o padrh h'f8050000 initialized retained ? * 3 retained paiorh h'f8050004 initialized retained ? * 3 retained pacrh1 h'f8050008 initialized retained ? * 3 retained pacrh2 h'f805000a initialized retained ? * 3 retained pbdrl h'f8050012 initialized retained ? * 3 retained pbiorl h'f8050016 initialized retained ? * 3 retained pbcrl1 h'f805001c initialized retained ? * 3 retained pbcrl2 h'f805001e initialized retained ? * 3 retained pcdrh h'f8050020 initialized retained ? * 3 retained pcdrl h'f8050022 initialized retained ? * 3 retained pciorh h'f8050024 initialized retained ? * 3 retained pciorl h'f8050026 initialized retained ? * 3 retained pddrl h'f8050032 initialized retained ? * 3 retained pdiorl h'f8050036 initialized retained ? * 3 retained pdcrl2 h'f805003e initialized retained ? * 3 retained pedrh h'f8050040 initialized retained ? * 3 retained pedrl h'f8050042 initialized retained ? * 3 retained peiorh h'f8050044 initialized retained ? * 3 retained peiorl h'f8050046 initialized retained ? * 3 retained pecrh1 h'f8050048 initialized retained ? * 3 retained pecrh2 h'f805004a initialized retained ? * 3 retained pecrl1 h'f805004c initialized retained ? * 3 retained pecrl2 h'f805004e initialized retained ? * 3 retained intc iprc h'f8080000 initialized retained ? * 3 retained iprd h'f8080002 initialized retained ? * 3 retained ipre h'f8080004 initialized retained ? * 3 retained power-down mode stbcr3 h'f80a0000 initialized retained ? * 3 retained stbcr4 h'f80a0004 initialized retained ? * 3 retained
section 18 list of registers rev. 4.00 sep. 13, 2007 page 434 of 502 rej09b0239-0400 module register abbreviation address power-on reset software standby module standby sleep h-udi sdir h'f8100200 retained retained retained retained sdid h'f8100214 retained retained retained retained intc icr0 h'f8140000 initialized * 1 retained ? * 3 retained irqcr h'f8140002 initialized retained ? * 3 retained irqsr h'f8140004 initialized * 1 retained ? * 3 retained ipra h'f8140006 initialized retained ? * 3 retained iprb h'f8140008 initialized retained ? * 3 retained cpg frqcr h'f815ff80 initialized * 2 retained ? * 3 retained power-down mode stbcr h'f815ff82 initialized retained ? * 3 retained wdt wtcnt h'f815ff84 initialized * 2 retained ? * 3 retained wtcsr h'f815ff86 initialized * 2 retained ? * 3 retained power-down mode stbcr2 h'f815ff88 initialized retained ? * 3 retained scif_0 scsmr_0 h'f 8400000 initialized retained retained retained scbrr_0 h'f8400004 initialized retained retained retained scscr_0 h'f8400008 initialized retained retained retained scftdr_0 h'f840000c undefined retained retained retained scfsr_0 h'f8400010 initialized retained retained retained scfrdr_0 h'f8400014 undefined retained retained retained scfcr_0 h'f8400018 initialized retained retained retained scfdr_0 h'f840001c initializ ed retained retained retained scsptr_0 h'f8400020 initialized * 1 retained retained retained sclsr_0 h'f8400024 initialized retained retained retained scif_1 scsmr_1 h'f 8410000 initialized retained retained retained scbrr_1 h'f8410004 initialized retained retained retained scscr_1 h'f8410008 initialized retained retained retained scftdr_1 h'f841000c undefined retained retained retained scfsr_1 h'f8410010 initialized retained retained retained scfrdr_1 h'f8410014 undefined retained retained retained scfcr_1 h'f8410018 initialized retained retained retained scfdr_1 h'f841001c initializ ed retained retained retained
section 18 list of registers rev. 4.00 sep. 13, 2007 page 435 of 502 rej09b0239-0400 module register abbreviation address power-on reset software standby module standby sleep scif_1 scsptr_1 h' f8410020 initialized * 1 retained retained retained sclsr_1 h'f8410024 initialized retained retained retained scif_2 scsmr_2 h'f8420000 initialized retained retained retained scbrr_2 h'f8420004 initialized retained retained retained scscr_2 h'f8420008 initialized retained retained retained scftdr_2 h'f842000c undefined retained retained retained scfsr_2 h'f8420010 initialized retained retained retained scfrdr_2 h'f8420014 undefined retained retained retained scfcr_2 h'f8420018 initialized retained retained retained scfdr_2 h'f842001c initialized retained retained retained scsptr_2 h'f8420020 initialized * 1 retained retained retained sclsr_2 h'f8420024 initialized retained retained retained cmt cmstr h'f84a0070 initialized initialized retained retained cmcsr_0 h'f84a0072 initialized initialized retained retained cmcnt_0 h'f84a0074 initialized initialized retained retained cmcor_0 h'f84a0076 initialized initialized retained retained cmcsr_1 h'f84a0078 initialized initialized retained retained cmcnt_1 h'f84a007a initialized initialized retained retained cmcor_1 h'f84a007c initialized initialized retained retained hif hifidx h'f84d0000 initialized retained retained retained hifgsr h'f84d0004 initialized retained retained retained hifscr h'f84d0008 initialized * 1 retained retained retained hifmcr h'f84d000c initialized retained retained retained hifiicr h'f84d0010 initialized retained retained retained hifeicr h'f84d0014 initialized retained retained retained hifadr h'f84d0018 initialized retained retained retained hifdata h'f84d001c initializ ed retained retained retained hifdtr h'f84d0020 initialized retained retained retained hifbicr h'f84d0024 initialized retained retained retained hifbcr h'f84d0040 initialized * 1 retained retained retained
section 18 list of registers rev. 4.00 sep. 13, 2007 page 436 of 502 rej09b0239-0400 module register abbreviation address power-on reset software standby module standby sleep bsc cmncr h'f8fd0000 initialized * 1 retained ? * 3 retained cs0bcr h'f8fd0004 initialized retained ? * 3 retained cs3bcr h'f8fd000c initialized retained ? * 3 retained cs4bcr h'f8fd0010 initialized retained ? * 3 retained cs5bbcr h'f8fd0018 initialized retained ? * 3 retained cs6bbcr h'f8fd0020 initialized retained ? * 3 retained cs0wcr h'f8fd0024 initialized retained ? * 3 retained cs3wcr h'f8fd002c initialized retained ? * 3 retained cs3wcr (sdram in use) h'f8fd002c initialized retained ? * 3 retained cs4wcr h'f8fd0030 initialized retained ? * 3 retained cs5bwcr h'f8fd0038 initialized retained ? * 3 retained cs5bwcr (pcmcia in use) h'f8fd0038 initialized retained ? * 3 retained cs6bwcr h'f8fd0040 initialized retained ? * 3 retained cs6bwcr (pcmcia in use) h'f8fd0040 initialized retained ? * 3 retained sdcr h'f8fd0044 initialized retained ? * 3 retained rtcsr h'f8fd0048 initialized retained ? * 3 retained rtcnt h'f8fd004c initialized retained ? * 3 retained rtcor h'f8fd0050 initialized retained ? * 3 retained ubc bdrb h'ffffff90 initialized retained retained retained bdmrb h'ffffff94 initialized retained retained retained brcr h'ffffff98 initialized retained retained retained betr h'ffffff9c initialized retained retained retained barb h'ffffffa0 initialized retained retained retained bamrb h'ffffffa4 initialized retained retained retained bbrb h'ffffffa8 initialized retained retained retained brsr h'ffffffac initialized * 1 retained retained retained bara h'ffffffb0 initialized retained retained retained
section 18 list of registers rev. 4.00 sep. 13, 2007 page 437 of 502 rej09b0239-0400 module register abbreviation address power-on reset software standby module standby sleep ubc bamra h'ffffffb4 initialized retained retained retained bbra h'ffffffb8 initialized retained retained retained brdr h'ffffffbc initialized * 1 retained retained retained cache ccr1 h'ffffffec initialized retained retained retained notes: 1. some bits are not initialized. 2. not initialized by a power-on reset caused by the wdt. 3. this module does not ent er the module standby mode.
section 18 list of registers rev. 4.00 sep. 13, 2007 page 438 of 502 rej09b0239-0400
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 439 of 502 rej09b0239-0400 section 19 electrical characteristics 19.1 absolute maximum ratings table 19.1 shows the absolute maximum ratings. table 19.1 absolute maximum ratings item symbol value unit power supply voltage (i/o) v cc q ?0.3 to +4.2 v power supply voltage (internal) v cc , v cc (pll1), v cc (pll2) ?0.3 to +2.5 v input voltage v in ?0.3 to v cc q + 0.3 v operating temperature regular specifications t opr ?20 to +75 c wide-range specifications ?40 to +85 c storage temperature t stg ?55 to +125 c caution: permanent damage to the lsi may resu lt if absolute maximum ratings are exceeded. 19.2 power-on and power-off order ? order of turning on 1.5-v system power (v cc (main), v cc (sub), v cc (pll1), and v cc (pll2)) and 3.3-v system power (v cc q) ? first turn on the 3.3-v system power, then turn on the 1.5-v system power within 1 ms. this time should be as short as possible. the sy stem design must ensure that the states of pins or undefined period of an internal state do not cause erroneous system operation. ? until voltage is applied to all power supplies and a low level is input to the res pin, internal circuits remain unsettled, and so pin states are also undefined. the system design must ensure that these undefined states do not cause erroneous system operation. waveforms at power-on are shown in the following figure.
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 440 of 502 rej09b0239-0400 v cc q (min.) power v cc (min.) v cc /2 v cc q : 3.3-v system power v cc : 1.5-v system power t pwu t unc gnd pin states undefined normal operation period input low level in advance power-on reset state pin states undefined res other pins * note: * except power/gnd and clock-related pins table 19.2 recommended timing at power-on item symbol maximum value unit time difference between turning on v cc q and v cc t pwu 1 ms time over which the internal state is undefined t unc 100 ms note: * the values shown in table 19.2 are recommended values, so they represent guidelines rather than strict requirements. the time over which th e internal state is undefined me ans the time taken to reach v cc (min.). the pin states become settled when v cc q reached the v cc q (min.). the timing when a power-on reset ( res ) is normally accepted is after v cc reaches v cc (min.) and oscilla tion becomes stable (when using the on-chip oscillator). ensure that the time over which the internal state is undefined is less than or equal to 100 ms.
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 441 of 502 rej09b0239-0400 ? power-off order ? in the reverse order of power-on, first turn off the 1.5-v system power, then turn off the 3.3-v system power within 10 ms. this time should be as short as possible. the system design must ensure that the states of pins or undefined period of an internal state do not cause erroneous system operation. ? pin states are undefined while only the 1.5- v system power is turn ed off. the system design must ensure that these undefined states do not cause erroneous system operation. v cc q : 3.3-v system power v cc : 1.5-v system power t pwd gnd operation stopped normal operation period v cc /2 table 19.3 recommended timing in power-off item symbol maximum value unit time difference between turning off v cc q and v cc t pwd 10 ms note: * the table shown above is recommended values, so they represent guidelines rather than strict requirements.
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 442 of 502 rej09b0239-0400 19.3 dc characteristics tables 19.4 and 19.5 show the dc characteristics. table 19.4 dc characteristics (1) conditions: t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. typ. max. unit test conditions current consumption normal operation i cc ? 100 140 ma v cc = 1.5 v v cc q = 3.3 v i cc q ? 30 50 ma i = 100 mhz b = 50 mhz standby mode i stby ? 500 700 a t a = 25 c v cc = 1.5 v v cc q = 3.3 v sleep mode i sleep ? 40 60 ma i sleepq ? 30 50 ma v cc = 1.5 v v cc q = 3.3 v b = 50 mhz input leakage current all pins | i in | ? ? 1.0 a v in = 0.5 to v cc q ? 0.5 v tri-state leakage current i/o pins, all output pins (off state) | i sti | ? ? 1.0 a v in = 0.5 to v cc q ? 0.5 v input capacitance all pins c ? ? 10 pf
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 443 of 502 rej09b0239-0400 table 19.4 dc characteristics (2) conditions: t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. typ. max. unit test conditions power supply v cc q 3.0 3.3 3.6 v v cc , v cc (pll1), v cc (pll2) 1.4 1.5 1.6 input high voltage res , nmi, irq7 to irq0, md5, md3 to md0, asemd , testmd , hifmd, trst v ih v cc q 0.9 ? v cc q + 0.3 v extal v cc q ? 0.3 ? v cc q + 0.3 other input pins 2.0 ? v cc q + 0.3 input low voltage res , nmi, irq7 to irq0, md5, md3 to md0, asemd , testmd , hifmd, trst v il ?0.3 ? v cc q 0.1 v extal ?0.3 ? v cc q 0.2 other input pins ?0.3 ? v cc q 0.2 2.4 ? ? v v cc q = 3.0 v i oh = ?200 a output high voltage all output pins v oh 2.0 ? ? v cc q = 3.0 v i oh = ?2 ma output low voltage all output pins v ol ? ? 0.55 v v cc q = 3.6 v i ol = 2.0 ma notes: 1. the v cc and v ss pins must be connected to the v cc and v ss . 2. current consumption values are for v ih min. = v cc q ? 0.5 v and v il max. = 0.5 v with all output pins unloaded.
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 444 of 502 rej09b0239-0400 table 19.5 permissible output currents conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. typ. max. unit permissible output low current (per pin) i ol ? ? 2.0 ma permissible output low current (total) i ol ? ? 120 ma permissible output high current (per pin) ?i oh ? ? 2.0 ma permissible output high current (total) ?i oh ? ? 40 ma caution: to protect the lsi's re liability, do not exceed the output current values in table 19.5. 19.4 ac characteristics signals input to this lsi are basically handled as signals synchronized with the clock. unless otherwise noted, setup and hold times for individual signals must be followed. table 19.6 maximum operating frequency conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = -40c to +85c (wide-range specifications) item symbol min. typ. max. unit test conditions operating frequency cpu, cache (i ) f 20 ? 100 mhz external bus (b ) 20 ? 50 on-chip peripheral module (p ) 5 ? 50
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 445 of 502 rej09b0239-0400 19.4.1 clock timing table 19.7 clock timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40c to +85c (wide-range specifications), external bus operating frequ ency (max.) = 50 mhz item symbol min. max. unit. reference figures extal clock input frequency f ex 10 25 mhz figure 19.1 extal clock input cycle time t excyc 40 100 ns extal clock input low pulse width t exl 10 ? ns extal clock input high pulse width t exh 10 ? ns extal clock rising time t exr ? 4 ns extal clock falling time t exf ? 4 ns ckio clock output frequency f op 20 50 mhz figure 19.2 ckio clock output cycle time t cyc 20 50 ns ckio clock low pulse width t ckol 5 ? ns ckio clock high pulse width t ckoh 5 ? ns ckio clock rising time t ckor ? 5 ns ckio clock falling time t ckof ? 5 ns oscillation settling time (power- on) t osc1 10 ? ms figure 19.3 res setup time t ress 25 ? ns res assert time t resw 20 ? t bcyc * figures 19.3 and 19.4 oscillation settling time 1 (leaving standby mode) t osc2 10 ? ms figure 19.4 oscillation settling time 2 (leaving standby mode) t osc3 ? 10 ms figure 19.5 pll synchronize settling time t pll ? 100 s figure 19.6 note: * t bcyc indicates the period of the external bus clock (b ).
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 446 of 502 rej09b0239-0400 t exh t exf t exr t exl t ex cyc v ih v ih v ih 1/2 v cc 1/2 v cc v il v il note: * when the clock is input to the extal pin extal * (input) figure 19.1 external clock input timing t cyc t ckol t ckoh v oh 1/2 v cc 1/2 v cc t ckor t ckof v oh v ol v ol v oh ckio (output) figure 19.2 ckio clock output timings v cc min. t resw t ress t osc1 v cc res ckio, internal clock oscillation settled note: oscillation settling time when the internal oscillator is in use figure 19.3 oscillation settling timing after power-on
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 447 of 502 rej09b0239-0400 t osc2 t resw res ckio, internal clock oscillation settled note: oscillation settling time when the internal oscillator is in use standby mode figure 19.4 oscillation settling timing after standby mode (by reset) t osc3 nmi ckio, internal clock oscillation settled note: oscillation settling time when the internal oscillator is in use standby mode figure 19.5 oscillation settling timing after standby mode (by nmi or irq) t pll pll output, ckio output input clock settled note: pll oscillation settling time when the clock is input to the extal pin extal input reset or nmi interrupt request pll synchronization internal clock pll synchronization input clock settled standby mode figure 19.6 pll synchronize settling timing by reset or nmi
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 448 of 502 rej09b0239-0400 19.4.2 control signal timing table 19.8 control signal timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40c to +85c (wide-range specifications) item symbol min. max. unit reference figures res pulse width t resw 20 * 2 ? t bcyc * 3 res setup time * 1 t ress 25 ? ns figures 19.7 and 19.8 res hold time t resh 15 ? ns nmi setup time * 1 t nmis 12 ? ns figure 19.8 nmi hold time t nmih 10 ? ns irq7 to irq0 setup time * 1 t irqs 12 ? ns irq7 to irq0 hold time t irqh 10 ? ns bus tri-state delay time 1 t boff1 ? 20 ns figure 19.9 bus tri-state delay time 2 t boff2 ? 20 ns bus buffer on time 1 t bon1 ? 20 ns bus buffer on time 2 t bon2 ? 20 ns notes: 1. the res , nmi, and irq7 to irq0 signals are a synchronous signals. when the setup time is satisfied, a signal change is detect ed at the rising edge of the clock signal. when the setup time is not satisfied, a signal change may be delayed to the next rising edge. 2. in standby mode, t resw = t osc2 (10 ms). when changing the clock multiplication, t resw = t pll1 (100 s). 3. t bcyc indicates the period of the external bus clock (b ). ckio t ress t ress res t resw figure 19.7 reset input timing
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 449 of 502 rej09b0239-0400 ckio res t resh t ress v ih v il nmi t nmih t nmis v ih v il irq7 to irq0 t irqh t irqs v ih v il figure 19.8 int errupt input timing ckio t boff2 t boff1 t bon2 t bon1 a25 to a0, d15 to d0 r d , rd/ wr , ras , cas , csn , wen , bs , cke normal mode standby mode normal mode figure 19.9 pin drive timing in standby mode
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 450 of 502 rej09b0239-0400 19.4.3 bus timing table 19.9 bus timing conditions: clock mode = 1/2/5/6, v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. max. unit reference figures address delay time 1 t ad1 1 15 ns figures 19.10 to 19.37 address setup time t as 3 ? ns figures 19.10 to 19.13 address hold time t ah 3 ? ns figures 19.10 to 19.13 bs delay time t bsd 0 14 ns figures 19.10 to 19.29 and 19.33 to 19.36 cs delay time 1 t csd1 1 14 ns figures 19.10 to 19.36 read write delay time t rwd 1 14 ns figures 19.10 to 19.36 write strobe delay time t rwd2 ? 14 ns figure 19.15 read strobe time t rsd 1/2 t bcyc 1/2 t bcyc + 13 ns figures 19.10 to 19.15, 19.33, and 19.34 read data setup time 1 t rds1 1/2 t bcyc + 10 ? ns figures 19.10 to 19.15, and 19.33 to 19.36 read data setup time 2 t rds2 12 ? ns figures 19.16 to 19.19 and 19.24 to 19.26 read data hold time 1 t rdh1 0 ? ns figures 19.10 to 19.15 and 19.33 to 19.36 read data hold time 2 t rdh2 2 ? ns figures 19.16 to 19.19 and 19.24 to 19.26 write enable delay time 1 t wed1 1/2 t bcyc 1/2 t bcyc + 13 ns figures 19.10 to 19.14, 19.33, and 19.34 write enable delay time 2 t wed2 ? 13 ns figure 19.15 write data delay time 1 t wdd1 ? 18 ns figures 19.10 to 19.15 and 19.33 to 19.36 write data delay time 2 t wdd2 ? 17 ns figures 19.20 to 19.23 and 19.27 to 19.29 write data hold time 1 t wdh1 2 ? ns figures 19.10 to 19.15 and 19.33 to 19.36
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 451 of 502 rej09b0239-0400 item symbol min. max. unit reference figures write data hold time 2 t wdh2 2 ? ns figures 19.20 to 19.23 and 19.27 to 19.29 write data hold time 3 t wdh3 0 ? ns figures 19.10 to 19.13 wait setup time t wts 1/2 t bcyc + 11 ? ns figures 19.12 to 19.15, 19.34, and 19.36 wait hold time t wth 1/2 t bcyc + 10 ? ns figures 19.12 to 19.15, 19.34, and 19.36 ras delay time t rasd 1 15 ns figures 19.16 to 19.27 and 19.29 to 19.32 cas delay time t casd 1 15 ns figures 19.16 to 19.32 dqm delay time t dqmd 1 15 ns figures 19.16 to 19.29 cke delay time t cked ? 14 ns figure 19.31 iciord delay time t icrsd 1/2 t bcyc 1/2 t bcyc + 15 ns figures 19.35 and 19.36 iciowr delay time t icwsd 1/2 t bcyc 1/2 t bcyc + 15 ns figures 19.35 and 19.36 iois16 setup time t io16s 1/2 t bcyc + 11 ? ns figure 19.36 iois16 hold time t io16h 1/2 t bcyc + 10 ? ns figure 19.36
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 452 of 502 rej09b0239-0400 19.4.4 basic timing t1 t ad1 t as t csd1 t2 t ad1 t rwd t rwd t csd1 t rsd t rsd t ah t rds1 t wed1 t wed1 t ah t bsd t bsd t wdd1 ckio a25 to a0 csn rd/ wr rd d15 to d0 read wen bs d15 to d0 write t wdh1 t wdh3 t rdh1 figure 19.10 basic bus timing: no wait cycle
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 453 of 502 rej09b0239-0400 t1 t ad1 t as t csd1 tw t2 t ad1 t rwd t rwd t csd1 t rsd t rsd t ah t rds1 t wed1 t wed1 t ah t bsd t bsd t wth t wts t wdd1 ckio a25 to a0 csn rd/ wr rd d15 to d0 read wen bs wait d15 to d0 write t wdh3 t wdh1 t rdh1 figure 19.11 basic bus timi ng: one software wait cycle
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 454 of 502 rej09b0239-0400 t1 t ad1 t as t csd1 tw x t2 t ad1 t rwd t rwd t csd1 t rsd t rsd t ah t rds1 t wed1 t wed1 t ah t bsd t bsd t wth t wts t wth t wts t wdd1 ckio a25 to a0 csn rd/ wr rd d15 to d0 read wen bs wait d15 to d0 write t wdh3 t wdh1 t rdh1 figure 19.12 basic bus timi ng: one external wait cycle
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 455 of 502 rej09b0239-0400 t ad1 t ad1 t1 t rwd t rsd t wed1 t wed1 t wed1 t rds1 t rds1 t rdh1 t rdh1 t as t rsd t rsd t ah t rsd t ah t wed1 t ah t ah t csd1 t wdd1 t wdh1 t wdh1 t wdd1 t bsd t bsd t bsd t bsd t rwd t rwd t rwd t csd1 t csd1 t csd1 t as t ad1 t ad1 tw t2 ta w t1 tw t2 taw a25 to a0 d15 to d0 csn rd/ wr rd wait d15 to d0 we n bs ckio t wth t wts t wth t wts read write t wdh3 t wdh3 figure 19.13 basic bus timing : one software wait cycle, external wait enabled (wm bit = 0), no idle cycle
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 456 of 502 rej09b0239-0400 th t1 tw x t2 tf t ad1 t csd1 t ad1 t csd1 t bsd t bsd t wth t wts t wth t wts t wdh1 t wdd1 ckio an csn rd/ wr rd wen rd/ wr bs wait t rdh1 t rds1 t rwd t rwd t rwd t rwd t rsd t rsd t wed1 t wed1 d15 to d0 d15 to d0 read write figure 19.14 byte contro l sram timing: sw = 1 cycle, hw = 1 cycle, one asynchronous external wait cycle, csnwcr.bas = 0 (ub-/ lb-controlled write cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 457 of 502 rej09b0239-0400 th t1 tw x t2 tf t ad1 t csd1 t ad1 t csd1 t bsd t bsd t wth t wts t wth t wts t wdh1 t wdd1 ckio an csn rd/ wr rd wen rd/ wr bs wait t rdh1 t rds1 t rwd t rwd t rwd t rwd2 t rwd2 t rwd t rsd t rsd t wed2 t wed2 d15 to d0 d15 to d0 read write figure 19.15 byte contro l sram timing: sw = 1 cycle, hw = 1 cycle, one asynchronous external wait cycle, csnw cr.bas = 1 (we-controlled write cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 458 of 502 rej09b0239-0400 19.4.5 synchronous dram timing t c1 t r t cw t d1 t de t ad1 t ad1 t csd1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 t ad1 t rdh2 t rds2 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras row address read a command column address t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx note: * an address pin connected to pin a10 of sdram figure 19.16 synchronous dram single read bus cycle (auto-precharge, cas latency = 2, wtrcd = 0 cycle, wtrp = 0 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 459 of 502 rej09b0239-0400 t rw t r t c1 t cw t d1 t de t ap t ad1 t ad1 t csd1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 t ad1 t rdh2 t rds2 ckio csn rd/ wr a11 * t rasd t rasd ras row address read a command column address t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram figure 19.17 synchronous dram single read bus cycle (auto-precharge, cas latency = 2, wtrcd = 1 cycle, wtrp = 1 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 460 of 502 rej09b0239-0400 tc1 tc2 td1 td2 td3 td4 tr tc3 tc4 tde t ad1 t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 t ad1 t ad1 t rdh2 t rds2 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras read command t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t rdh2 t rds2 read a command and a ad a comma m a a re e e a rea man column address column address column address row address column address note: * an address pin connected to pin a10 of sdram figure 19.18 synchronous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 0 cycle, wtrp = 1 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 461 of 502 rej09b0239-0400 tc1 tc2 td1 td2 td3 td4 tr trw tc3 tc4 tde t ad1 t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 t ad1 t ad1 t rdh2 t rds2 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras read command t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t rdh2 t rds2 and a ead a comma m ea ma re e e a rea ma column address column address row address column address column address note: * an address pin connected to pin a10 of sdram figure 19.19 synchronous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 1 cycle, wtrp = 0 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 462 of 502 rej09b0239-0400 tr w l tr t c 1 t ad1 t csd1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 ckio csn rd/ wr a11 * t rasd t rasd ras row address column address t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram write a command figure 19.20 synchronous d ram single write bus cycle (auto-precharge, trwl = 1 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 463 of 502 rej09b0239-0400 tr w t c 1 tr w l tr tr w t ad1 t csd1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 ckio csn rd/ wr a11 * t rasd t rasd ras row address write a command column address t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram figure 19.21 synchronous d ram single write bus cycle (auto-precharge, wtrcd = 2 cycles, trwl = 1 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 464 of 502 rej09b0239-0400 tc2 tc3 tc4 trwl tr tc1 t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras write command t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 t wdh2 t wdd2 w w w w w w mand d write a comm w w d m w d row address column address column address column address column address note: * an address pin connected to pin a10 of sdram figure 19.22 synchronous dram bu rst write bus cycle (single write 4) (auto-precharge, wtrcd = 0 cycle, trwl = 1 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 465 of 502 rej09b0239-0400 tc2 tc3 tc4 trwl tr tc1 tr w t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras write command t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 t wdh2 t wdd2 w w w w w mand d write a comm w d m w d column address column address column address column address row address note: * an address pin connected to pin a10 of sdram figure 19.23 synchronous dram bu rst write bus cycle (single write 4) (auto-precharge, wtrcd = 1 cycle, trwl = 1 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 466 of 502 rej09b0239-0400 tc3 tc4 tde tr tc2 td1 td2 td3 td4 tc1 t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t rdh2 t rds2 t rdh2 t rds2 read command column address column address column address column address row address note: * an address pin connected to pin a10 of sdram figure 19.24 synchronous dram burst read bus cycle (single read 4) (bank active mode: act + read commands , cas latency = 2, wtrcd = 0 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 467 of 502 rej09b0239-0400 tc2 tc4 tde tc1 tc3 td1 td2 td3 td4 t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t csd1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd ras read command t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t rdh2 t rds2 t rdh2 t rds2 column address column address column address column address note: * an address pin connected to pin a10 of sdram figure 19.25 synchronous dram burst read bus cycle (single read 4) (bank active mode: read command, same row address, cas latency = 2, wtrcd = 0 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 468 of 502 rej09b0239-0400 tc3 tc4 tde tc2 td1 td2 td3 td4 tc1 tr tpw tp t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd t rasd t rasd ras t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t rdh2 t rds2 t rdh2 t rds2 read command column address column address column address column address row address note: * an address pin connected to pin a10 of sdram figure 19.26 synchronous dram burst read bus cycle (single read 4) (bank active mode: pre + act + read commands, different row addresses, cas latency = 2, wtrcd = 0 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 469 of 502 rej09b0239-0400 tc2 tc3 tc4 tr tc1 t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 t rasd t rasd ras t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 t wdh2 t wdd2 write command row address column address column address column address column address note: * an address pin connected to pin a10 of sdram figure 19.27 synchronous dram bu rst write bus cycle (single write 4) (bank active mode: act + write commands, wtrcd = 0 cycle, trwl = 0 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 470 of 502 rej09b0239-0400 tc2 tc3 tc4 tnop tc1 t ad1 t csd1 t ad1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 ras t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 t wdh2 t wdd2 write command column address column address column address column address note: * an address pin connected to pin a10 of sdram figure 19.28 synchronous dram bu rst write bus cycle (single write 4) (bank active mode: write command, same row address, wtrcd = 0 cycle, trwl = 0 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 471 of 502 rej09b0239-0400 tc2 tc3 tc4 tr ta p tp tc1 t ad1 t csd1 t ad1 t ad1 t ad1 t rwd t rwd t rwd t rwd t csd1 t rasd t rasd t rasd t rasd t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 csn rd/ wr a11 * d15 to d0 ras t ad1 t ad1 t casd t casd cas t bsd t bsd (high) bs cke t dqmd t dqmd dqmxx t wdh2 t wdd2 t wdh2 t wdd2 write command row address column address column address column address column address note: * an address pin connected to pin a10 of sdram figure 19.29 synchronous dram bu rst write bus cycle (single write 4) (bank active mode: pre + act + write commands, different row addresses, wtrcd = 0 cycle, trwl = 0 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 472 of 502 rej09b0239-0400 tr c tr c tr r ta p tp tr c t csd1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t csd1 t csd1 t rasd t rasd t rasd t rasd t ad1 t ad1 ckio csn rd/ wr a11 * ras t casd t casd cas (high) (hi-z) bs cke dqmxx a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram figure 19.30 synchronous d ram auto-refreshing timing (wtrp = 1 cycle, wtrc = 3 cycles)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 473 of 502 rej09b0239-0400 tr c tr c tr c tr c tr r ta p tp tr c t csd1 t ad1 t ad1 t rwd t rwd t rwd t csd1 t csd1 t csd1 t rasd t rasd t rasd t rasd t ad1 t ad1 ckio csn rd/ wr a11 * ras t casd t casd cas (hi-z) bs cke dqmxx t cked t cked a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram figure 19.31 synchronous dram self -refreshing timing (wtrp = 1 cycle)
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 474 of 502 rej09b0239-0400 trc trc trc tmw tde tr r tr r ta p tp tr c t csd1 t ad1 t ad1 t ad1 pall ref ref mrs t rwd t rwd t rwd t csd1 t csd1 t csd1 t rasd t rasd t rasd t rasd t ad1 t ad1 ckio csn rd/ wr a11 * ras t casd t casd cas (hi-z) bs cke dqmxx t csd1 t csd1 t rasd t rasd t casd t casd t csd1 t csd1 t rwd t rwd t rasd t rasd t casd t casd a25 to a0 d15 to d0 note: * an address pin connected to pin a10 of sdram figure 19.32 synchronous dram mode register write timing (wtrp = 1 cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 475 of 502 rej09b0239-0400 19.4.6 pcmcia timing ckio a25 to a0 cexx rd/ wr rd d15 to d0 we d15 to d0 bs read write t ad1 t csd1 t rwd t ad1 t csd1 t rwd t wdd1 t wdh1 t bsd t bsd t rsd t wed t wed t wdh5 t rsd t rdh1 t rds1 tpcm1w tpcm2 tpcm1 tpcm1w tpcm1w figure 19.33 pcmcia memory card interface bus timing
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 476 of 502 rej09b0239-0400 read write d15 to d0 d15 to d0 a25 to a0 ckio cexx rd/ wr rd we bs wait t wts t ad1 t csd1 t rwd t ad1 t csd1 t rwd t bsd t bsd t wdh1 t wdd1 t wed t wed t wdh5 t rsd t rsd t rdh1 t rds1 t wth t wth t wts tpcm1w tpcm2 tpcm0 tpcm1 tpcm1w tpcm0w tpcm2w tpcm1w tpcm1w figure 19.34 pcmcia memory card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one software wa it cycle, one external wait cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 477 of 502 rej09b0239-0400 read write d15 to d0 d15 to d0 a25 to a0 ckio cexx rd/ wr iciord iciowr bs t ad1 t csd1 t rwd t ad1 t csd1 t rwd t bsd t bsd t wdh1 t wdd1 t icwsd t icwsd t wdh5 t icrsd t icrsd t rdh1 t rds1 tpci1w tpci2 tpci1 tpci1w tpci1w figure 19.35 pcmcia i/o card interface bus timing
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 478 of 502 rej09b0239-0400 read write d15 to d0 d15 to d0 a25 to a0 ckio cexx rd/ wr iciord iciowr bs t ad1 t csd1 t rwd t ad1 t csd1 t rwd t bsd t io16s t io16h t bsd t wdh1 t wdd1 t icwsd t icwsd t wdh5 t icrsd t icrsd t rdh1 t rds1 t wth t wth t wts t wts tpci1w tpci2 tpci0 tpci1 tpci1w tpci0w tpci2w tpci1w tpci1w iois16 wait figure 19.36 pcmcia i/o card interface bus timing (ted = 2.5 cycles, teh = 1.5 cycles, one software wa it cycle, one external wait cycle)
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 479 of 502 rej09b0239-0400 19.4.7 scif timing table 19.10 scif timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. max. unit reference figures clocked synchronous t scyc 12 ? t pcyc figures 19.37 and 19.38 input clock cycle asynchronous t scyc 4 ? t pcyc input clock rising time t sckr ? 0.8 t pcyc figure 19.37 input clock falling time t sckf ? 0.8 t pcyc input clock pulse width t sckw 0.4 0.6 t scyc transmit data delay time t txd ? 3 t pcyc * + 50 ns figure 19.38 receive data setup time (clocked synchronous) t rxs 3 ? t pcyc receive data hold time (clocked synchronous) t rxh 3 ? t pcyc rts delay time t rtsd ? 100 ns cts setup time (clocked synchronous) t ctss 100 ? ns cts hold time (clocked synchronous) t ctsh 100 ? ns note: * t pcyc indicates the period of the peripheral clock (p ). t sckw t sckr t sckf t scyc sck figure 19.37 sck input clock timing
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 480 of 502 rej09b0239-0400 t scyc t txd sck txd (data transmission) rxd (data reception) t rxh t rxs t rtsd rts cts t ctsh t ctss figure 19.38 sci input/output timing in clocked synchronous mode 19.4.8 port timing table 19.11 port timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. max. unit reference figures output data delay time t portd ? 20 ns figure 19.39 input data setup time t ports 16 ? ns input data hold time t porth 10 ? ns t ports ckio t porth t portd ports a to e (read) ports a to e (write) figure 19.39 i/o port timing
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 481 of 502 rej09b0239-0400 19.4.9 hif timing table 19.12 hif timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. max. unit reference figures read bus cycle time t hifcycr 4 ? t pcyc figure 19.40 write bus cycle time t hifcycw 4 ? t pcyc address setup time (hifscr.dmd = 0) t hifas 10 ? ns address setup time (hifscr.dmd = 1) t hifas 0 ? ns address hold time (hifscr.dmd = 0) t hifah 10 ? ns address hold time (hifscr.dmd = 1) t hifah 0 ? ns address setup time (for hifrd , hifwr )t hifas 10 ? ns address hold time (for hifrd , hifwr ) t hifah 10 ? ns read low width (read) t hifwrl 2.5 ? t pcyc write low width (write) t hifwwl 2.5 ? t pcyc read/write high width t hifwrwh 2.0 ? t pcyc read data delay time t hifrdd ? 2 t pcyc + 16 ns read data hold time t hifrdh 0 ? ns write data setup time t hifwds t pcyc + 10 ? ns write data hold time t hifwdh 10 ? ns hifint output delay time t hifitd ? 20 ns figure 19.41 hifrdy output delay time t hifryd ? 10 t pcyc figure 19.42 hifdreq output delay time t hifdqd ? 20 ns figure 19.41 hif pin enable delay time t hifebd ? 20 ns figure 19.42 hif pin disable delay time t hifdbd ? 20 ns figure 19.42 notes: 1. t pcyc indicates the period of the peripheral module clock (p ). 2. t hifas is given from the start of the time over which both the hifcs and hifrd (or hifwr ) signals are low levels. 3. t hifah is given from the end of the time over which both the hifcs and hifrd (or hifwr ) signals are low levels. 4. t hifwrl is given as the time over which both the hifcs and hifrd signals are low levels. 5. t hifwwl is given as the time over which both the hifcs and hifwr signals are low levels.
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 482 of 502 rej09b0239-0400 6. when reading the register specified by bits reg5 to reg0 after writing to the hif index register (hifidx), t hifwrwh (min.) = 2 t pcyc + 5 ns. hifrs hifcs hifrd hifwr hifd15 to hifd00 t hifwrl t hifcycr t hifcycw t hifwwl t hifwrwh t hifwds t hifrdh t hifrdd t hifas t hifas t hifah t hifah t hifwdh read data write data figure 19.40 hif access timing ckio hifint t hifdqd t hifitd hifdreq figure 19.41 hifint and hifdreq timing
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 483 of 502 rej09b0239-0400 t hifdbd t hifebd t hifryd t hifryd hifd15 to hifd0 hifebl hifrdy res hifint hifdreq hifrdy figure 19.42 hifrdy and hi f pin enable/disable timing 19.4.10 related pin timing table 19.13 h-udi-rel ated pin timing conditions: v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v, t a = ?20 c to +75 c (regular specifications), t a = ?40 c to +85 c (wide-range specifications) item symbol min. max. unit reference figures tck cycle time t tckcyc 50 ? ns figure 19.43 tck high pulse width t tckh 19 ? ns tck low pulse width t tckl 19 ? ns tck rising/falling time t tckrf ? 4 ns trst setup time t trsts 10 ? t bcyc * figure 19.44 trst hold time t trsth 50 ? t bcyc * tdi setup time t tdis 10 ? ns figure 19.45 tdi hold time t tdih 10 ? ns tms setup time t tmss 10 ? ns tms hold time t tmsh 10 ? ns tdo delay time t tdod ? 19 ns note: * t bcyc indicates the period of the external bus clock (b ).
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 484 of 502 rej09b0239-0400 t tckcyc v ih 1/2 v cc q 1/2 v cc q v ih v il v il v ih t tckl t tckrf t tckrf t tckh figure 19.43 tck input timing t trsts t trsth trst res figure 19.44 tck input timing in reset hold state tck tms tdi tdo t tdis t tdih t tckcyc t tmss t tmsh t tdod figure 19.45 h-udi data transmission timing
section 19 electrical characteristics rev. 4.00 sep. 13, 2007 page 485 of 502 rej09b0239-0400 19.4.11 ac characteristic test conditions ? i/o signal reference level: v cc q/2 (v cc q = 3.0 v to 3.6 v, v cc = 1.4 v to 1.6 v) ? input pulse level: v ss to v cc ( res , nmi, irq7 to irq0, md5, md3 to md0, asemd , testmd , hifmd, trst , and extal), v ss to 3.0 v (other pins) ? input rising and falling times: 1 ns i ol i oh c l v ref lsi output pin dut output notes: 1. c l is the total value that includes the capacitance of measurement instruments, etc., and is set for all pins as 30 pf. 2. i ol and i oh are shown in table 19.5. figure 19.46 output load circuit
section 19 electric al characteristics rev. 4.00 sep. 13, 2007 page 486 of 502 rej09b0239-0400 19.4.12 delay time variation due to load capacitance (reference values) a graph (reference data) of the variation in dela y time when a load capacitance greater than that stipulated (30 pf) is connected to this lsi's pins is shown below. the graph shown in figure 19.47 should be taken into considerati on in the design process if the st ipulated capacitance is exceeded in connecting an external device. if the connected load capacitance exceeds the range shown in figure 19.47, the graph will not be a straight line. +0 +10 +20 +30 +0 +1 +2 +3 +40 +50 delay time (ns) load capacitance (pf) figure 19.47 load capaci tance versus delay time
appendix rev. 4.00 sep. 13, 2007 page 487 of 502 rej09b0239-0400 appendix a. port states in each pin state table a.1 port states in each pin state reset state power-down mode classifi- cation abbr. power-on (hifmd = low) power-on (hifmd = high) software standby sleep h-udi module standby clock extal i i i i i xtal o * 1 o * 1 o * 1 o * 1 o * 1 ckio o * 1 o * 1 zo * 5 o * 1 o * 1 system control res i i i i i operating mode control md5, md3 to md0 i i i i i interrupt nmi i i i i i irq4 to irq0 ? ? i i i a25 to a16 ? ? zhl * 4 o o address bus a15 to a0 o o zhl * 4 o o data bus d15 to d0 z z z io io wait ? ? z i i iois16 ? ? z i i cke ? ? zo * 2 o o cas , ras ? ? zo * 2 o o we0 /dqmll h h zh * 4 o o we1 /dqmlu/ we h h zh * 4 o o iciord ? ? zh * 4 o o iciowr ? ? zh * 4 o o bus control rd h h zh * 4 o o
appendix rev. 4.00 sep. 13, 2007 page 488 of 502 rej09b0239-0400 reset state power-down mode classifi- cation abbr. power-on (hifmd = low) power-on (hifmd = high) software standby sleep h-udi module standby rd/ wr h h zh * 4 o o ce2b / ce2a ? ? zh * 4 o o cs6b / ce1b , cs5b / ce1a ? ? zh * 4 o o cs4 , cs3 ? ? zh * 4 o o cs0 h h zh * 4 o o bus control bs ? ? zh * 4 o o scif txd2 to txd0 ? ? z o o rxd2 to rxd0 ? ? z i i sck2, sck1 ? ? z o o sck0 ? ? z i i rts1, rts0 ? ? z o o cts1, cts0 ? ? z i i host interface hifebl ? z z i i hifrdy ? o o o * 3 o * 3 hifdreq ? z z o * 3 o * 3 hifmd i i i i * 3 i * 3 hifint ? z z o * 3 o * 3 hifrd ? z z i * 3 i * 3 hifwr ? z z i * 3 i * 3 hifrs ? z z i * 3 i * 3 hifcs ? z z i * 3 i * 3 hifd15 to hifd0 ? z z io * 3 io * 3
appendix rev. 4.00 sep. 13, 2007 page 489 of 502 rej09b0239-0400 reset state power-down mode classifi- cation abbr. power-on (hifmd = low) power-on (hifmd = high) software standby sleep h-udi module standby trst i i i i i tck i i i i i tms i i i i i tdi i i i i i tdo z z zo * 6 zo * 6 z user debugging interface (h-udi) asemd i i i i i i/o port pa25 to pa16 z z z p i/o pb13 to pb00 z z z p i/o pc20 to pc00 z z z p i/o pd07 to pd00 z z z p i/o pe24 to pe04, pe02 to pe00 z ? z p i/o pe03 ? ? z p i/o testmd i i i i i test mode testout testout2 o o o o o [legend] ? : this pin function is not selected as an initial state. i: input o: output io: input/output h: high level output l: low level output z: high-impedance p: input or output dependi ng on the register setting notes: 1. depends on the clock mode (setting of pins md2 to md0). 2. depends on the hizcnt bit in cmncr. 3. high-impedance when hifebl = low 4. depends on the hizmem bit in cmncr. 5. depends on the hizcnt bit in cmncr or the ckoen bit in frqcr. 6. this pin becomes output state only when reading data from the h-udi and retains high- impedance state when the pi n is not output state.
appendix rev. 4.00 sep. 13, 2007 page 490 of 502 rej09b0239-0400 b. product code lineup product code ca talogue code operating temperature solder ball package code d17606bg100v HD6417606bg100v ? 20 to 75c pb-free bp-176v d17606bgn100v HD6417606bgn100v ? 20 to 75c pb-free bp-176v d17606bgw100v HD6417606bgw100v ? 40 to 85c pb-free bp-176v d17606bg100 HD6417606bg100 ? 20 to 75c non-pb-free bp-176 d17606bgn100 HD6417606bgn100 ? 20 to 75c non-pb-free bp-176 d17606bgw100 HD6417606bgw100 ? 40 to 85c non-pb-free bp-176
appendix rev. 4.00 sep. 13, 2007 page 491 of 502 rej09b0239-0400 c. package dimensions jeita package code renesas code previous code mass[typ.] p-lfbga176-13x13-0.80 plbg0176ga-a bp-176/bp-176v 0.45g d e wsa ws b x4 v y 1 s y s s a 1 a a b 1 2 3 4 5 6 7 8 910111213141 5 e x b e z e z d a b c d e f g h j k l m n p r msa b dimension in millimeters min nom max reference symbol d e v w a a 1 e b x y y 1 s d s e z d z e 13.0 13.0 0.15 0.20 1.40 0.35 0.40 0.45 0.80 0.50 0.55 0.45 0.08 0.10 0.2 0.90 0.90 figure c.1 package dimensions (bp-176)
appendix rev. 4.00 sep. 13, 2007 page 492 of 502 rej09b0239-0400
rev. 4.00 sep. 13, 2007 page 493 of 502 rej09b0239-0400 main revisions and add itions in this edition item page revision (see manual for details) amended. bit description 12.3.7 serial status register (scfsr) 252 5 [clearing conditions] ? tdfe is cleared to 0 when data exceeding the specified transmission trigger number is written to scftdr after 1 is read from the tdfe bit and then 0 is written ? tdfe is cleared to 0 when dmac write data exceeding the specified transmission trigger number to scftdr 1: the number of transmit data in scftdr is equal to or less than the specified transmission trigger number * [setting conditions] ? tdfe is set to 1 by a power-on reset ? tdfe is set to 1 when the nu mber of transmit data in scftdr becomes equal to or less than the specified transmission trigger number as a result of transmission note: * since scftdr is a 16-byte fifo register, the maximum number of data that can be written when tdfe is 1 is "16 minus the s pecified transmission trigger number". if an attempt is made to write additional data, the data is ignored. the number of data in scftdr is indicated by the upper 8 bits of scfdr. 12.4.3 synchronous mode 287 added. ??when the scif is not transmitting or receiving, the clock signal remains in the high state. when onl y receiving, the clock signal outputs while the re bit of scscr is 1 and the number of data in receive fifo is less than the receive fifo data trigger number. in this case, 8 (16 + 1) = 136 pulses of synchronous clock are output. to perform reception of n characters of data, select an external clock as the clock source. if an internal clock should be used, set re = 1 and te = 1 and receive n characters of data simult aneously with the transmission of n characters of dummy data.
rev. 4.00 sep. 13, 2007 page 494 of 502 rej09b0239-0400 item page revision (see manual for details) figure 12.13 sample flowchart for transmitting serial data 289 amended. start of transmission read tdfe flag in scfsr tdfe = 1? all data transmitted? no yes no [1] [2] write transmit data to scftdr read tdfe and tend flags in scfsr while they are 1, then clear them to 0 [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr. read the tdfe and tend flags while they are 1, then clear them to 0. [2] serial transmission continuation procedeure: to continue serial transmission, read 1 from the tdfe flag to confirm that writing is possible, then write data to scftdr, and then clear the tdfe flag to 0. figure 12.18 sample flowchart for transmitting/receiving serial data 293 amended. start of transmission and reception initialization read tdfe flag in scfsr tdfe = 1? no yes [1] write transmit data to scftdr read tdfe and tend flags in scfsr while they are 1, then clear them to 0 [1] scif status check and transmit data write: read scfsr and check that the tdfe flag is set to 1, then write transmit data to scftdr. read the tdfe and tend flags while they are 1, then clear them to 0. the transition of the tdfe flag from 0 to 1 can also be identified by a txi interrupt. [2] receive error handling: read the orer flag in sclsr to identify any error, perform the appropriate error handling, then clear the orer flag to 0. transmission/reception cannot be resumed while the orer flag is set to 1. figure 19.18 synchronous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 0 cycle, wtrp = 1 cycle) 460 amended. tc1 tc2 td1 td2 td3 td4 tr tc3 tc4 tde t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address column address row address column address figure 19.19 synchr onous dram burst read bus cycle (single read 4) (auto-precharge, cas latency = 2, wtrcd = 1 cycle, wtrp = 0 cycle) 461 amended. tc1 tc2 td1 td2 td3 td4 tr trw tc3 tc4 tde t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address row address column address column address
rev. 4.00 sep. 13, 2007 page 495 of 502 rej09b0239-0400 item page revision (see manual for details) figure 19.22 synchr onous dram burst write bus cycle (single write 4) (auto-precharge, wtrcd = 0 cycle, trwl = 1 cycle) 464 amended. tc2 tc3 tc4 trwl tr t c 1 t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 row address column address column address column address column address figure 19.23 synchr onous dram burst write bus cycle (single write 4) (auto-precharge, wtrcd = 1 cycle, trwl = 1 cycle) 465 amended. tc2 tc3 tc4 trwl tr tc1 tr w t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address column address column address row address figure 19.24 synchronous dram burst read bus cycle (single read 4) (bank active mode: act + read commands, cas latency = 2, wtrcd = 0 cycle) 466 amended. tc3 tc4 tde tr t c 2 td1 td2 td3 td4 tc1 t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address column address column address row address figure 19.25 synchr onous dram burst read bus cycle (single read 4) (bank active mode: read command, same row address, cas latency = 2, wtrcd = 0 cycle) 467 amended. t ad1 t ad1 t ad1 t ad1 t ad1 tc2 tc4 tde tc1 tc3 td1 td2 td3 td4 ckio a25 to a0 column address column address column address column address figure 19.26 synchr onous dram burst read bus cycle (single read 4) (bank active mode: pre + act + read commands, different row addresses, cas latency = 2, wtrcd = 0 cycle) 468 amended. tc3 tc4 tde tc2 td1 td2 td3 td4 tc1 tr tpw tp t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address column address column address row address
rev. 4.00 sep. 13, 2007 page 496 of 502 rej09b0239-0400 item page revision (see manual for details) figure 19.27 synchr onous dram burst write bus cycle (single write 4) (bank active mode: act + write commands, wtrcd = 0 cycle, trwl = 0 cycle) 469 amended. tc2 tc3 tc4 tr tc1 t ad1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 row address column address column address column address column address figure 19.28 synchronous dram burst write bus cycle (single write 4) (bank active mode: write command, same row address, wtrcd = 0 cycle, trwl = 0 cycle) 470 amended. tc2 tc3 tc4 tnop tc1 t ad1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 column address column address column address column address figure 19.29 synchronous dram burst write bus cycle (single write 4) (bank active mode: pre + act + write commands, different row addresses, wtrcd = 0 cycle, trwl = 0 cycle) 471 amended. tc2 tc3 tc4 tr ta p tp tc1 t ad1 t ad1 t ad1 t ad1 ckio a25 to a0 t ad1 t ad1 row address column address column address column address column address
rev. 4.00 sep. 13, 2007 page 497 of 502 rej09b0239-0400 index a access wait control................................. 152 address array............................................ 58 address error exception handling ............. 71 address error sources ............................... 71 address multiplexing.............................. 156 addressing modes..................................... 28 arithmetic operation instructions ............. 41 asynchronous mode............................... 273 auto-refreshing....................................... 175 b bank active ............................................. 168 basic timing............................................ 148 basic timing for i/o card interface ......... 187 basic timing for memory card interf ace .......................................... 185 bit rate .................................................... 257 boundary scan ........................................ 413 branch instructions ................................... 45 burst read................................................ 163 burst write .............................................. 167 bus state controller (bsc) ...................... 107 byte-selection sram interface .............. 180 c cache ........................................................ 51 cache stru cture ......................................... 51 cases when exceptions are accepted......... 76 changing clock operating mode ............. 202 changing divi sion ratio........................... 201 changing frequency................................ 200 changing multiplication ratio ................. 200 clock operating modes ........................... 196 clock pulse generator (cpg)................. 193 coherency of cache and external memory ....................................... 58 compare match timer (cmt) ................. 225 control registers........................................ 21 cpu........................................................... 19 d data array.................................................. 59 data register............................................ 363 data transfer instructions .......................... 39 divided areas and cache............................ 53 e endian/access size and da ta alignment ... 143 exception handling ................................... 65 exception handling operations.................. 66 exception handling vector table................ 67 extension of chip select ( csn ) assertion period ....................................... 153 f features of instructions ............................. 25 g general illegal in structions ....................... 75 general registers (rn) ............................... 21 h host interface (hif)................................ 301 h-udi interrupt ...................................... 412 h-udi reset ........................................... 412
rev. 4.00 sep. 13, 2007 page 498 of 502 rej09b0239-0400 i i/o ports.................................................. 363 illegal slot in structions.............................. 75 immediate data formats ............................ 25 initial values of registers........................... 23 instruction formats.................................... 31 instruction set ........................................... 35 interrupt controller (intc)....................... 81 interrupt exception handling..................... 73 interrupt exception handling vector table ............................................. 100 interrupt priority ....................................... 72 interrupt response time ........................... 104 interrupt sequence................................... 102 interrupt sources ....................................... 72 irq7 to irq0 interrupts........................... 98 l logic operation instructions ..................... 43 m memory data formats................................ 24 memory-mapped cache ............................ 58 module standby mode ............................ 223 multiplexed pin....................................... 333 n nmi interrupt............................................ 98 normal space interface ........................... 148 o on-chip peripheral module interrupts....... 99 p pcmcia interface .................................. 184 pin assignments........................................... 6 pin function contro ller (pfc).................. 333 pin functions ............................................... 7 power-down modes................................. 213 power-on reset .......................................... 69 power-on sequence ................................. 178 r read access............................................... 56 receiving serial data (asynchronous mode) .............................. 282 receiving serial data (synchronous mode)................................ 291 refreshing............................................... 175 register bamra...................... 380, 419, 431, 437 bamrb...................... 382, 419, 431, 436 bara ......................... 379, 419, 431, 436 barb ......................... 381, 419, 430, 436 bbra ......................... 380, 419, 431, 437 bbrb.......................... 383, 419, 431, 436 bdmrb...................... 383, 419, 430, 436 bdrb ......................... 382, 419, 430, 436 betr .......................... 387, 419, 430, 436 brcr.......................... 385, 419, 430, 436 brdr ......................... 389, 420, 431, 437 brsr .......................... 388, 419, 431, 436 ccr1 ............................ 54, 420, 432, 437 ccr3 .................................................... 55 cmcnt .............................................. 228 cmcnt_0 .......................... 418, 425, 435 cmcnt_1 .......................... 418, 426, 435 cmcor.............................................. 228 cmcor_0.......................... 418, 425, 435 cmcor_1.......................... 418, 426, 435 cmcsr............................................... 227 cmcsr_0........................... 418, 425, 435
rev. 4.00 sep. 13, 2007 page 499 of 502 rej09b0239-0400 cmcsr_1 .......................... 418, 425, 435 cmncr...................... 116, 419, 427, 436 cmstr....................... 226, 418, 425, 435 cs0bcr ............................. 419, 427, 436 cs0wcr .................... 122, 419, 428, 436 cs3bcr ............................. 419, 428, 436 cs3wcr .............124, 132, 419, 428, 436 cs4bcr ............................. 419, 428, 436 cs4wcr .................... 125, 419, 429, 436 cs5bbcr........................... 419, 428, 436 cs5bwcr...........128, 135, 419, 429, 436 cs6bbcr........................... 419, 428, 436 cs6bwcr...........130, 135, 419, 429, 436 csnbcr ............................................. 117 csnwcr ............................................ 122 frqcr ....................... 198, 417, 423, 434 hifadr ..................... 314, 419, 427, 435 hifbcr...................... 315, 419, 427, 435 hifbicr .................... 317, 419, 427, 435 hifdata................... 315, 419, 427, 435 hifdtr...................... 316, 419, 427, 435 hifeicr..................... 313, 418, 426, 435 hifgsr...................... 307, 418, 426, 435 hifidx....................... 305, 418, 426, 435 hifiicr...................... 312, 418, 426, 435 hifmcr..................... 310, 418, 426, 435 hifscr ...................... 307, 418, 426, 435 icr0 ............................. 84, 417, 423, 434 ipr........................................................ 94 ipra ................................... 417, 423, 434 iprb ................................... 417, 423, 434 iprc ................................... 416, 422, 433 iprd ................................... 416, 422, 433 ipre ................................... 416, 422, 433 irqcr.......................... 84, 417, 423, 434 irqsr .......................... 88, 417, 423, 434 pacrh1..................... 344, 416, 421, 433 pacrh2..................... 344, 416, 421, 433 padrh....................... 363, 416, 421, 433 paiorh ..................... 343, 416, 421, 433 pbcrl1...................... 347, 416, 421, 433 pbcrl2...................... 347, 416, 421, 433 pbdrl........................ 365, 416, 421, 433 pbiorl ...................... 347, 416, 421, 433 pcdrh ....................... 368, 416, 421, 433 pcdrl........................ 368, 416, 421, 433 pciorh...................... 352, 416, 421, 433 pciorl ...................... 352, 416, 422, 433 pdcrl2...................... 353, 416, 422, 433 pddrl ....................... 370, 416, 422, 433 pdiorl ...................... 352, 416, 422, 433 pecrh1...................... 355, 416, 422, 433 pecrh2...................... 355, 416, 422, 433 pecrl1 ...................... 355, 416, 422, 433 pecrl2 ...................... 355, 416, 422, 433 pedrh ....................... 373, 416, 422, 433 pedrl........................ 373, 416, 422, 433 peiorh ...................... 355, 416, 422, 433 peiorl ...................... 355, 416, 422, 433 rtcnt ....................... 141, 419, 430, 436 rtcor ....................... 142, 419, 430, 436 rtcsr........................ 139, 419, 429, 436 scbrr................................................ 257 scbrr_0............................ 417, 424, 434 scbrr_1............................ 417, 424, 434 scbrr_2............................ 418, 425, 435 scfcr ................................................ 263 scfcr_0 ............................ 417, 424, 434 scfcr_1 ............................ 418, 424, 434 scfcr_2 ............................ 418, 425, 435 scfdr................................................ 267 scfdr_0............................ 417, 424, 434 scfdr_1............................ 418, 424, 434 scfdr_2............................ 418, 425, 435 scfrdr ............................................. 240 scfrdr_0 ......................... 417, 424, 434 scfrdr_1 ......................... 418, 424, 434 scfrdr_2 ......................... 418, 425, 435 scfsr ................................................ 249 scfsr_0 ............................ 417, 424, 434
rev. 4.00 sep. 13, 2007 page 500 of 502 rej09b0239-0400 scfsr_1 ............................ 417, 424, 434 scfsr_2 ............................ 418, 425, 435 scftdr............................................. 241 scftdr_0 ......................... 417, 424, 434 scftdr_1 ......................... 417, 424, 434 scftdr_2 ......................... 418, 425, 435 sclsr................................................ 272 sclsr_0............................ 417, 424, 434 sclsr_1............................ 418, 425, 435 sclsr_2............................ 418, 425, 435 scrsr................................................ 240 scscr................................................ 245 scscr_0............................ 417, 424, 434 scscr_1............................ 417, 424, 434 scscr_2............................ 418, 425, 435 scsmr............................................... 241 scsmr_0........................... 417, 423, 434 scsmr_1........................... 417, 424, 434 scsmr_2........................... 418, 425, 435 scsptr.............................................. 268 scsptr_0.......................... 417, 424, 434 scsptr_1.......................... 418, 424, 435 scsptr_2.......................... 418, 425, 435 sctsr................................................ 240 sdbpr ............................................... 402 sdbsr ............................................... 403 sdcr...........................138, 419, 429, 436 sdid............................409, 417, 423, 434 sdir............................402, 417, 423, 434 stbcr ........................216, 417, 423, 434 stbcr2 ......................217, 417, 423, 434 stbcr3 ......................218, 416, 423, 433 stbcr4 ......................219, 416, 423, 433 wtcnt.......................206, 417, 423, 434 wtcsr .......................207, 417, 423, 434 register data format.................................. 24 relationship between refresh requests and bus cycles........................... 178 reset ......................................................... 69 risc-type................................................. 25 s scif initialization (asynchronous mode) ............................ 277 scif initialization (synchronous mode)................................ 287 sdram direct connection...................... 155 sdram interface ................................... 155 searching cache ........................................ 55 self-refreshing ........................................ 177 serial communication interface with fifo (scif).................................... 235 shift instructions ....................................... 44 single read .............................................. 166 single write ............................................ 168 sleep mode.............................................. 220 software standby mode........................... 220 stack states after exception handling ends ............................................ 77 state transition .......................................... 48 synchronous mode.................................. 286 system control instructions....................... 46 system registers ........................................ 23 t tap controller ........................................ 410 transmitting and receiving serial data simultaneously (synchronous mode)....... 293 transmitting serial data (asynchronous mode) .............................. 279 transmitting serial data (synchronous mode)................................ 289 trap instructions ....................................... 74 types of exception handling and priority................................................ 65 types of exceptions triggered by instructions................................................ 74 types of power-down modes.................. 213
rev. 4.00 sep. 13, 2007 page 501 of 502 rej09b0239-0400 u u memory ................................................. 63 user break controller (ubc) .................. 377 user break interrupt .................................. 99 user debugging interface (h-udi) ......... 399 w wait between access cycles .................... 190 watchdog timer (wdt) .......................... 205 write access .............................................. 57 write-back buffer...................................... 57
rev. 4.00 sep. 13, 2007 page 502 of 502 rej09b0239-0400
renesas 32-bit risc microcomputer hardware manual sh7606 group publication date: rev.1.00, mar. 18, 2005 rev.4.00, sep. 13, 2007 published by: sales strategic planning div. renesas technology corp. edited by: customer support department global strategic communication div. renesas solutions corp. ? 2007. renesas technology corp., all rights reserved. printed in japan.
sales strategic planning div. nippon bldg., 2-6-2, ohte-machi, chiyoda-ku, tokyo 100-0004, japan http://www.renesas.com refer to " http://www.renesas.com/en/network " for the latest and detailed information. renesas technology america, inc. 450 holger way, san jose, ca 95134-1368, u.s.a tel: <1> (408) 382-7500, fax: <1> (408) 382-7501 renesas technology europe limited dukes meadow, millboard road, bourne end, buckinghamshire, sl8 5fh, u.k. tel: <44> (1628) 585-100, fax: <44> (1628) 585-900 renesas technology (shanghai) co., ltd. unit 204, 205, aziacenter, no.1233 lujiazui ring rd, pudong district, shanghai, china 200120 tel: <86> (21) 5877-1818, fax: <86> (21) 6887-7898 renesas technology hong kong ltd. 7th floor, north tower, world finance centre, harbour city, 1 canton road, tsimshatsui, kowloon, hong kong tel: <852> 2265-6688, fax: <852> 2730-6071 renesas technology taiwan co., ltd. 10th floor, no.99, fushing north road, taipei, taiwan tel: <886> (2) 2715-2888, fax: <886> (2) 2713-2999 renesas technology singapore pte. ltd. 1 harbour front avenue, #06-10, keppel bay tower, singapore 098632 tel: <65> 6213-0200, fax: <65> 6278-8001 renesas technology korea co., ltd. kukje center bldg. 18th fl., 191, 2-ka, hangang-ro, yongsan-ku, seoul 140-702, korea tel: <82> (2) 796-3115, fax: <82> (2) 796-2145 renesas technology malaysia sdn. bhd unit 906, block b, menara amcorp, amcorp trade centre, no.18, jalan persiaran barat, 46050 petaling jaya, selangor darul ehsan, malaysia tel: <603> 7955-9390, fax: <603> 7955-9510 renesas sales offices colophon 6.0

sh7606 group hardware manual


▲Up To Search▲   

 
Price & Availability of HD6417606

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X